Google | Phone | Group odd-valued and even-valued nodes in Linked List
Anonymous User
1612

Note: this question is not to be confused with, thats what I thought at first
https://leetcode.com/problems/odd-even-linked-list/

You want to group all nodes with VALUEs that are even together and all nodes with VALUES that are odd together.

Ex:
Input: 2->1->3->5->6->4->7->NULL
Output: 1->3->5->7->2->6->4->NULL

Anyone know if there's a way of doing this in-place?

Comments (13)