A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only…
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which…
There are n cities connected by m flights. Each flight starts from city u and arrives at v with a price w. Now…
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water…
Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and…
This website uses cookies.