[Solved] A self-dividing number is a number that is divisible by every digit it contains.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a string s, return the string after replacing every uppercase letter with the same lowercase letter.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given the root node of a binary search tree (BST) and a value to insert into the tree. Return the root node of the BST after the insertion. It is guaranteed that the new value does not exist in the original BST.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given the root of a binary search tree (BST) and an integer val. Find the node in the BST that the node’s value equals val and return the subtree rooted with that node. If such a node does not exist, return null.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are keeping the scores for a baseball game with strange rules. At the beginning of the game, you start with an empty record. You are given a list of strings operations, where operations[i] is the ith operation you must apply to the record and is one of the following:Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] There is a robot starting at the position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes its moves.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] You are given an integer array nums with no duplicates. A maximum binary tree can be built recursively from nums using the following algorithm: Create a root node whose value is the maximum value in nums.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a Binary Search Tree and a target number k, return true if there exist two elements in the BST such that their sum is equal to the given target.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of a binary tree, return the average value of the nodes on each level in the form of an array. Answers within 10-5 of the actual answer will be accepted.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Write an SQL query to swap all ‘f’ and ‘m’ values (i.e., change all ‘f’ values to ‘m’ and vice versa) with a single update statement and no intermediate temporary tables.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Write an SQL query to report the movies with an odd-numbered ID and a description that is not “boring”.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of an n-ary tree, return the postorder traversal of its nodes’ values. Nary-Tree input serialization is represented in their level order traversal. Each group of children is separated by the null value (See examples)Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] A country is big if: it has an area of at least three million (i.e., 3000000 km2), or it has a population of at least twenty-five million (i.e., 25000000). Write an SQL query to report the name, population, and area of the big countries.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given the root of an n-ary tree, return the preorder traversal of its nodes’ values. Nary-Tree input serialization is represented in their level order traversal. Each group of children is separated by the null value (See examples)Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] In MATLAB, there is a handy function called reshape which can reshape an m x n matrix into a new one with a different size r x c keeping its original data. You are given an m x n matrix mat and two integers r and c representing the number of rows and the number of columns of the wanted reshaped matrix.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given an integer array nums of 2n integers, group these integers into n pairs (a1, b1), (a2, b2), …, (an, bn) such that the sum of min(ai, bi) for all i is maximized. Return the maximized sum.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022
[Solved] Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Leetcode SolutionsAbhishek SharmaSeptember 27, 2022