Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.
Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
Given a root node reference of a BST and a key, delete the node with the given key from the BST. Return the root node reference (possibly updated) of the BST.
You are given the root node of a binary search tree (BST) and a value to insert into the tree. Return the root node of the BST after the insertion. It is guaranteed that the new value does not exist in the original BST.
Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.
Given an array of meeting time intervals intervals, return the minimum number of conference rooms required.
We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance K from the target node.
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order.
In mathematics, the power set of a set S is the set of all subsets of S, including the empty set and S itself.