Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. void sortStreets(string streetList[], int streetCount)
  2. {
  3. string currentMin = "";
  4. int current;
  5. int next;
  6. for (current = 0; current < (streetCount-1) ; current++)
  7. {
  8. currentMin = streetList[current];
  9.  
  10. for (next = current+1; next < streetCount; next++)
  11. {
  12. if (streetList[next] < streetList[current])
  13. {
  14. currentMin = streetList[next];
  15. }
  16. }
  17.  
  18. swap(streetList[current], streetList[next]);
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement