Tag: linked list
Given a binary search tree root, convert it to a singly linked list using level order traversal. Constraints 1 ≤ n ≤ 100,000 where n is the number of …
Given a single linked list node, representing a binary number with most significant digits first, return it as an integer. Example 1 Input node = 1 → 0 → …
Given the head of a linked list and two integers m and n. Traverse the linked list and remove some nodes in the following way: Start with the head …
Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, return the …
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds …