摘要:
Problem Description:Given a sorted integer array where the range of elements are [lower,upper] inclusive, return its missing ranges.For example, given... 阅读全文
摘要:
Well, the key to this problem is on how to identify the recurring parts. After doing some examples using pen and paper, you may find that for the deci... 阅读全文
摘要:
The problem statement has stated that there are bothO(n)andO(nlogn)solutions to this problem. Let's see theO(n)solution first (taken fromthis link), w... 阅读全文
摘要:
Problem Description:Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string d... 阅读全文
摘要:
This link has a great discussion about this problem. You may refer to it if you like. In fact, the idea and code in this passage is from the former li... 阅读全文
摘要:
Well, this problem has a nice BFS structure.Let's see the example in the problem statement.start = "hit"end = "cog"dict = ["hot", "dot", "dog", "lot",... 阅读全文