For this question, we need to consider a case when word A and word B bot...
This problem can be simplified to an n shortest distance problem. We sta...
This question is actually asking how to check whether a graph has a cycl...
For each node, there may be several conditions: 1. root.left <0 and root...
For this problem, we divide it into 2 parts, reverse LinkedList and conn...
For this problem, we take use of the sliding window. First we should sea...
We divide the number every 4 digits, for each interval, it's xxx hundred...
For this problem, we can scan all the people in one-pass. From people 0,...
For LRU cache, it's like a fifo queue but reassign the existing value to...