2192. All Ancestors of a Node in a Directed Acyclic Graph
This is a solution to the 2192. All Ancestors of a Node in a Directed Acyclic Graph problem on LeetCode.
This is a solution to the 2192. All Ancestors of a Node in a Directed Acyclic Graph problem on LeetCode.
This is a solution to the Array Nesting problem on LeetCode.
This is a solution to the Balanced Binary Tree problem on LeetCode.
Given an `m x n` board where each cell is a battleship 'X' or empty '.', count the number of battleships on the board.
This is a solution to the Binary Search Tree to Greater Sum Tree problem on LeetCode.
This is a solution to binary-tree-longest-consecutive-sequence-ii problem on LeetCode.
Solution to Leetcode 257. Binary Tree Paths
This is a solution to the Binary Tree Right Side View problem on LeetCode.
This is a solution to the Binary Tree Tilt problem on LeetCode.
This is a solution to the Cat and Mouse problem on LeetCode.
This is a solution to the Balanced Binary Tree problem on LeetCode.
This is a solution to the Concatenated Words problem on LeetCode.
Given the root of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with the preorder traversal way.
Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus the sum of all keys greater than the original key in BST.
This document provides solutions for counting the number of leaf nodes in a binary tree.
Given a binary tree, count the number of visible nodes. A node is considered visible if, in the path from the root to that node, there are no nodes with a greater value.
This document provides a solution to the Course Schedule problem.
This document provides a solution to the Course Schedule II problem.
Solve the problem of deleting nodes from a binary tree and returning the forest of remaining trees using depth-first search.
This document provides a solution to the leetcode 211
This is a solution to the DFS Traversal of Graph problem on Geeks for Geeks.
Given the root of a full binary tree, evaluate the boolean result based on the given rules.
Given the root of a binary tree, return the leftmost value in the last row of the tree.
This is a solution to the Find Largest Value in Each Tree Row problem on LeetCode.
This is a solution to the Flatten a Multilevel Doubly Linked List problem on LeetCode.
This is a solution to the Flood Fill problem on LeetCode.
This is a solution to the Island Perimeter problem on LeetCode.
This document provides a solution where we Find the kth ancestor of a given node.
This is a solution to the Longest Increasing Path in a Matrix problem on LeetCode.
Return an integer array answer where answer[x] = y indicates that y is the person with the least quietness among all individuals who have equal to or more money than person x.
Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST.
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.
This is a solution to the Max Area of Island problem on LeetCode.
This is a solution to the Maximum Depth of Binary Tree problem on LeetCode.
Given two binary trees, merge them into a new binary tree by adding the values of overlapping nodes.
This is a solution to the Mini Parser problem on LeetCode.
This is a solution to the Minimum Time to Collect All Apples in a Tree problem on LeetCode.
Given the root of a binary tree, return the most frequent subtree sum. If there is a tie, return all the values with the highest frequency in any order.
Given the root of an n-ary tree, return the postorder traversal of its nodes' values.
Given the root of an n-ary tree, return the preorder traversal of its nodes' values.
This is a solution to the Number of Island problem on LeetCode.
This is a solution to the Number of Provincess problem on LeetCode.
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.
This is a solution to the Path Sum III problem on LeetCode.
Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. Each path should be returned as a list of the node values, not node references.
This is a solution to the Path With Minimum Effort problem on LeetCode.
This is a solution to the Prefix and Suffix Search problem on LeetCode.
This is a solution to pyramid-transition-matrix problem on LeetCode.
This is a solution to the Smallest Missing Genetic Value in Each Subtree problem on LeetCode.
Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false otherwise.
You are given the root of a binary tree containing digits from 0 to 9 only.Each root-to-leaf path in the tree represents a number.
This is a solution to the Surrounded Regions problem on LeetCode.