Remove Every Kth Node Leetcode Problems Javascript