Microsoft interview question

write a program to add a node to the sorted list.