GlobalLogic interview question

Delete last node in a linkedlist.