Given an undirected graph, return true if and only if it is bipartite. R...
DFS, BFS 假設(shè)點(diǎn)的數(shù)目為v, time complexity都為O(v)space complexity, BFS worst case...
Given a 01 matrix M, find the longest line of consecutive one in the mat...
Given two sentences words1, words2 (each represented as an array of stri...
On the first row, we write a 0. Now in every subsequent row, we look at ...
You are playing a simplified Pacman game. You start at the point (0, 0),...
In a directed graph, we start at some node and every turn, walk along a ...
In a given array nums of positive integers, find three non-overlapping s...
There is a box protected by a password. The password is n digits, where ...