## Solved! Leetcode 1161. Maximum Level Sum of a Binary Tree

source: https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/description/ Table of ContentsMaximum Level Sum of a Binary TreeExample 1:Example 2:Constraints:Solution Maximum Level Sum of a Binary Tree Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level x such that the sum of all ...

## Solved! Leetcode 863. All Nodes Distance K in Binary Tree

source: https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/description/ Table of ContentsAll Nodes Distance K in Binary TreeExample 1:Example 2:Constraints:Solution All Nodes Distance K in Binary Tree Description Given the root of a binary tree, the value of a target node target, and an integer k, return an array of the values of all nodes that have a distance k from the ...

## Solved! Leetcode 1514. Path with Maximum Probability

source: https://leetcode.com/problems/path-with-maximum-probability/description/ Table of ContentsPath with Maximum ProbabilityDescriptionExample 1:Example 2:Example 3:Constraints:Solution Path with Maximum Probability Description You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[i] = [a, b] is an undirected edge connecting the nodes a and b with a probability of success of traversing that ...

## Solved! Leetcode 1376. Time Needed to Inform All Employees

source: https://leetcode.com/problems/time-needed-to-inform-all-employees/description/ Time Needed to Inform All Employees Table of ContentsTime Needed to Inform All EmployeesDescriptionExample 1:Example 2:Constraints:Solution Description A company has n employees with a unique ID for each employee from 0 to n – 1. The head of the company is the one with headID. Each employee has one direct manager given in ...

## Solved! Leetcode 1091. Shortest Path in Binary Matrix

source: https://leetcode.com/problems/shortest-path-in-binary-matrix/description/ Shortest Path in Binary Matrix Table of ContentsShortest Path in Binary MatrixDescriptionExample 1:Example 2:Example 3:Constraints:Solution Description Given an n x n binary matrix grid, return the length of the shortest clear path in the matrix. If there is no clear path, return -1. A clear path in a binary matrix is a path ...

## Solved! Leetcode 2101. Detonate the Maximum Bombs

Table of ContentsDetonate the Maximum BombsExample 1:Example 2:Example 3:Constraints:Solution source: https://leetcode.com/problems/detonate-the-maximum-bombs/ Detonate the Maximum Bombs You are given a list of bombs. The range of a bomb is defined as the area where its effect can be felt. This area is in the shape of a circle with the center as the location of the ...

## Solved! Leetcode 785. Is Graph Bipartite?

source: https://leetcode.com/problems/is-graph-bipartite/description/ Is Graph Bipartite? There is an undirected graph with n nodes, where each node is numbered between 0 and n – 1. You are given a 2D array graph, where graph[u] is an array of nodes that node u is adjacent to. More formally, for each v in graph[u], there is an undirected ...

## Solved! Leetcode 2492. Minimum Score of a Path Between Two Cities

source: https://leetcode.com/problems/minimum-score-of-a-path-between-two-cities/ Minimum Score of a Path Between Two Cities You are given a positive integer n representing n cities numbered from 1 to n. You are also given a 2D array roads where roads[i] = [ai, bi, distancei] indicates that there is a bidirectional road between cities ai and bi with a distance equal ...

## Solved! Leetcode 1162: As Far from Land as Possible

source: https://leetcode.com/problems/as-far-from-land-as-possible/description/ As Far from Land as Possible Given an n x n grid containing only values 0 and 1, where 0 represents water and 1 represents land, find a water cell such that its distance to the nearest land cell is maximized, and return the distance. If no land or water exists in the ...

## Solved! Leetcode 1345. Jump Game IV

source: https://leetcode.com/problems/jump-game-iv/description/ Jump Game IV Given an array of integers arr, you are initially positioned at the first index of the array. In one step you can jump from index i to index: i + 1 where: i + 1 < arr.length. i – 1 where: i – 1 >= 0. j where: arr[i] == ...