public Node reverseAlterKNodes(Node head, int k, Boolean even){
		int x = k;
		Node moving = head;
		Node head_prev = null;
		Node head_next = null;
		if(even){
			while(x>0 && moving!=null){
				head_next = moving.next;
				moving.next = head_prev;
				head_prev = moving;
				moving = head_next;
				x--;
			}
			if(head!=null)
				head.next = reverseAlterKNodes(moving, k, false);
			return head_prev;			
		}
		else{
			Node prev = moving;
			while(x>1 && moving!=null){				
				moving = moving.next;
				x--;
			}
			if(moving!=null){				
				moving.next = reverseAlterKNodes(moving.next, k, true);				
			}
			return prev;
		}
		
	}