Howdy,

Here’s your coding challenge for today. You’re dealing with singly linked lists. Write your answer in any programming language on a github gist and share your answer in the comments below.

Difficulty: Medium

Given a singly linked list and an integer k, remove the kth last element from the list. k is guaranteed to be smaller than the length of the list.

The list is very long, so making more than one pass is prohibitively expensive.

Do this in constant space and in one pass.