jjrv 2652 days ago. link 2 points ▲ ▼They insert new numbers in the middle (using array.splice) as needed to keep the array sorted. This sounds O(N^2). Pretty terrible process overall really, for such a simple task.