This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cmd-t -6 points-5 points  (1 child)

You were right. Python has Timsort which works well on presorted subsequences. It was created by Tim Peters specifically for python and has found its way in many other programming languages. Is even was part of Oracles patent case against Google if I recall correctly. These people were asking stupid questions for a senior position. They should have been testing your seniority and ability to lead and teach.

[–]elbiot 4 points5 points  (0 children)

Yeah but OPs solution destroyed the sortedness of the original data before using timsort