📄️ Guidelines
Whenever you have a clear relation between different elements given by the problem statement you should think if you can reframe the initial problem to a graph.
📄️ Pacific Atlantic Water Flow
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.
📄️ Number of Islands
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.
📄️ Clone Graph
Return a deep copy (clone) of the graph.
📄️ Course Schedule
For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1. Return true if you can finish all courses. Otherwise, return false.
📄️ Course Schedule II
Return the ordering of courses you should take to finish all courses. If there are many valid answers, return any of them. If it is impossible to finish all courses, return an empty array.
📄️ Cheapest Flights Within K Stops
You are also given three integers src, dst, and k, return the cheapest price from src to dst with at most k stops. If there is no such route, return -1.
📄️ Minimum Height Trees
Among all possible rooted trees, those with minimum height (i.e. min(h)) are called minimum height trees (MHTs).
📄️ Sort Items by Groups Respecting Dependencies
Sort Items by Groups Respecting Dependencies...
📄️ Bus Routes
Return the least number of buses you must take to travel from source to target. Return -1 if it is not possible.