public static LinkedListNode reverseEveryOtherKNodes(LinkedListNode head, 
            int k)
    {
        LinkedListNode prev = null;
        LinkedListNode current = head;
        LinkedListNode next;
        int count = 0;
        
        while (count < k && current != null)
        {
            next = current.getNext();
            current.setNext(prev);
            prev = current;
            current = next;
            count++;
        }
        
        if (head != null)
        {
            head.setNext(current);
        }
        
        count = 0;
        while (count < k - 1 && current != null)
        {
            current = current.getNext();
            count++;
        }
        
        if (current != null)
            current.setNext(reverseEveryOtherKNodes(current.getNext(), k));
        
        return prev;
    }