Category: c / c++
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 …
A binary tree is given such that each node contains an additional random pointer which could point to any node in the tree or null. Return a deep copy …
Given an array nums. We define a running sum of an array as runningSum = sum(nums…nums). Return the running sum of nums. Example 1: Input: nums = Output: Explanation: …
Return any binary tree that matches the given preorder and postorder traversals. Values in the traversals pre and post are distinct positive integers. Example 1: Input: pre = , …
You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move …