Example 1

Example 2

The Linked List is not empty.Number of nodes will not exceed 30.Each node's value is either 0 or 1.Example 1

Example 2

The Linked List is not empty.Number of nodes will not exceed 30.Each node's value is either 0 or 1.