Solution for remove nth node in linked list