Category: BFS
There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, …, N-1, and each room may have some keys …
Given a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = Output: 15 Constraints: The number of nodes in the tree is …
An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers …
Given a 2D Grid with integer values representing the colours, you are asked (in an interview probably) to find out the maximum connected colour sizes. A colour is connected …
Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. Note: A leaf is a node with no children. Example: …