[Solved] Given an integer numRows, return the first numRows of Pascal’s triangle. In Pascal’s triangle, each number is the sum of the two numbers directly above it as shown.Leetcode SolutionsAbhishek SharmaSeptember 12, 2022
[Solved] You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:Leetcode SolutionsAbhishek SharmaSeptember 12, 2022
[Solved] Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no children.Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf is a node with no children.Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the left and right subtrees of every node differ in height by no more than 1.Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree. A height-balanced binary tree is a binary tree in which the depth of the two subtrees of every node never differs by more than one.Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given the root of a binary tree, return the bottom-up level order traversal of its nodes’ values. (i.e., from left to right, level by level from leaf to root).Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree.Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given the root of a binary tree, return its maximum depth. A binary tree’s maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given the root of a binary tree, return the zigzag level order traversal of its nodes’ values. (i.e., from left to right, then right to left for the next level and alternate between).Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given the root of a binary tree, return the level order traversal of its nodes’ values. (i.e., from left to right, level by level).Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).Leetcode SolutionsAbhishek SharmaSeptember 9, 2022
[Solved] Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical, and the nodes have the same value.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] Given the root of a binary tree, determine if it is a valid binary search tree (BST).Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] Given the root of a binary tree, return the inorder traversal of its nodes’ values.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right, and return the reversed list.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] Given a rows x cols binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022
[Solved] Given an array of integers heights representing the histogram’s bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.Leetcode SolutionsAbhishek SharmaSeptember 8, 2022