A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Comparing array element numbers

  1. #1
    Senior Member
    Join Date
    Apr 2003

    Comparing array element numbers

    Does anyone out there know how to sort by element number of an array? While the question might seem strange, the purpose is to compare element numbers of one array with those of another containing the same items in a different order. Any ideas, anyone?

  2. #2
    2 + 2 = 5
    Join Date
    Apr 2003
    Parker, Colorado
    Hmm.. the age old question of sorting. This is a huge concept in my computer science class. I cannot give you any code segments to help you with your dilema because I am learning Computer Science in C++, not Flash Actionscript.

    I would do a google search for these sorting algorythms.

    The most practical would be:
    linear sort or insertion sort.

    I would recommend doing a binary sort (google search it), but it will only work of the objects of the array are inserted in numerical order. This would be the most efficient method if you could manage it.

    These will only work if you can do recursions in Actionscript functions. They are somewhat advanced, yet extremely powerful.
    Heapsort, quicksort, mergesort...

    [size=1]Peace out fk. Thanks for all the good times .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center