News for hackers. Stuff that matters.
Re:Coding Interview Preparation in JavaScript by Redoubts on Tuesday March 01, 2016 @03:37PM (#11205836)

  > Let's say you have a list of events. For each event, you know the year, month, and some other data. You want them sorted chronologically. Obviously you're not going to code the sort by hand. Maybe you'd consider:
Why wouldn't I just do

  myList.sort(key=lambda x: castToTimestamp(x))
? Then I'm just sorting a list of integers/floats, which sounds like a solved problem.
Re:Coding Interview Preparation in JavaScript by packetslave on Wednesday March 02, 2016 @01:54AM (#11208470)
because you didn't ask how big the list was, it has 5 billion entries, and castToTimestamp is expensive?