Fugro interview question

Write an algorithm to divide array between "winter" and "summer" given a variable number of monthly temperature readings, with the rule that all winter temperatures are lower than all summer temperatures. Solution should be O(n).

Interview Answer

Anonymous

17 Mar 2018

I solved it with O(n2), since Angular question took a lot of time and there wasn't enough time left to go back and refactor.