[Solved] You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them together.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] Given an array nums of integers, return the length of the longest arithmetic subsequence in nums.Leetcode SolutionsAbhishek SharmaSeptember 28, 2022
[Solved] You are given the root of a binary tree where each node has a value 0 or 1. Each root-to-leaf path represents a binary number starting with the most significant bit.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] A valid parentheses string is either empty “”, “(” + A + “)”, or A + B, where A and B are valid parentheses strings, and + represents string concatenation.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an array of integers preorder, which represents the preorder traversal of a BST (i.e., binary search tree), construct the tree and return its root. It is guaranteed that there is always possible to find a binary search tree with the given requirements for the given test cases.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a string array words, return an array of all characters that show up in all strings within the words (including duplicates). You may return the answer in any order.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] In a town, there are n people labeled from 1 to n. There is a rumor that one of these people is secretly the town judge.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a binary tree with unique values and the values of two different nodes of the tree x and y, return true if the nodes corresponding to the values x and y in the tree are cousins, or false otherwise.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] A binary tree is uni-valued if every node in the tree has the same value. Given the root of a binary tree, return true if the given tree is uni-valued, or false otherwise.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given an integer array nums with the following properties: nums.length == 2 * n. nums contains n + 1 unique elements. Exactly one element of nums is repeated n times.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given an array of n strings strs, all of the same length. The strings can be arranged such that there is one on each line, making a grid. For example, strs = [“abc”, “bce”, “cae”] can be arranged as:Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] A permutation perm of n + 1 integers of all the integers in the range [0, n] can be represented as a string s of length n where: s[i] == ‘I’ if perm[i] < perm[i + 1], and s[i] == 'D' if perm[i] > perm[i + 1].Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high].Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Every valid email consists of a local name and a domain name, separated by the ‘@’ sign. Besides lowercase letters, the email may contain one or more ‘.’ or ‘+’. For example, in “alice@leetcode.com”, “alice” is the local name, and “leetcode.com” is the domain name.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Your friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might get long pressed, and the character will be typed 1 or more times.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers. Return any array that satisfies this condition.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only one right child.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] A sentence is a string of single-space separated words where each word consists only of lowercase letters.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022