• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Sorting Time Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sorting Time Question


  • Subject: Sorting Time Question
  • From: Francisco Tolmasky <email@hidden>
  • Date: Wed, 26 Mar 2003 19:30:59 -0800

Ok, if I have a self sorting array, when an object changes it must be resorted. Should I just call sortUsingFunction: or whatever, or is it worth it to implement a function that removes this item and reinserts it itself, possibly using a binary search to find where it belongs.

So basicall, if this is the original:

1
2
3

and 2 is changed to 5, then should I resort, OR do this

remove 2, leaving:

1
3

insert 5:

1
3
5


Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Sorting Time Question
      • From: Matt Ronge <email@hidden>
    • Re: Sorting Time Question
      • From: ryan <email@hidden>
  • Prev by Date: Re: Newbie (EXE_BAD_ACCESS?)
  • Next by Date: Executing short AppleScript command sets
  • Previous by thread: debugger problem
  • Next by thread: Re: Sorting Time Question
  • Index(es):
    • Date
    • Thread