MongoDB interview question

Write an algorithm to insert a node into a sorted linked list.