01 Matrix
Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.
Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.
Given the root of a binary tree, return the average value of the nodes on each level in the form of an array.
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).
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).
Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
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).
Return the least number of buses you must take to travel from source to target. Return -1 if it is not possible.
Return a deep copy (clone) of the graph.
Given the root of a binary tree, return the maximum width of the given tree.
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.
Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.
There is an m x n rectangular island that borders both the Pacific Ocean and Atlantic Ocean. The Pacific Ocean touches the island's left and top edges, and the Atlantic Ocean touches the island's right and bottom edges.
You are given a perfect binary tree where all leaves are on the same level, and every parent has two children.
Given a binary tree. Populate each next pointer to point to its next right node.
Every minute, any fresh orange that is 4-directionally adjacent to a rotten orange becomes rotten.
A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that...