1518. Water Bottles
There are numBottles water bottles that are initially full of water. You can exchange numExchange empty water bottles from the market with one full […]
There are numBottles water bottles that are initially full of water. You can exchange numExchange empty water bottles from the market with one full […]
Given a Binary Tree and an integer target. Find all the ancestors of the given target. Note: The ancestor of node x is node y, which is
There are n people standing in a line labeled from 1 to n. The first person in the line is holding a pillow initially. Every
Given a Binary Tree, complete the function to populate the next pointer for all nodes. The next pointer for every
You are given the head of a linked list, which contains a series of integers separated by 0‘s. The beginning and end of the linked list will have Node.val ==
Given a Binary Tree. You need to find and return the vertical width of the tree. Examples : Input: 1
A critical point in a linked list is defined as either a local maxima or a local minima. A node is a local maxima if the current node has
Given a binary tree, your task is to find all duplicate subtrees from the given binary tree. Duplicate Subtree : Two
You are given an integer array nums. In one move, you can choose one element of nums and change it to any value. Return the
Given a sorted linked list, delete all nodes that have duplicate numbers (all occurrences), leaving only numbers that appear once
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as
Given a linked list with string data, check whether the combined string formed is palindrome. If the combined string is