85257

liunx

Guest
I want to sort an array of names alphabetically but I want to be able to begin at some location other than "a". Any ideas?what location?It needs to vary and will be determined by a choice made in a dropdown. Lets assme that we have the following items:

Armstrong
Edina
Hopkins
Minnetonka
Wayzata

and we want to resort beginning with Hopkins.ok how are you going to sort them ? you want to sort them from H to W ?Lets start at hopkins, minnetonka, wayzata, armstrong, edina.then you need to sort the array as normal, using bubble sort and an offset to the first index of the character you are looking for

offset being 3 in case above.
 
Top