该文被密码保护。 阅读全文
摘要:
The key point of this problem is to find "key" of every words. Time complexity: O(n) How to find key of every string, we make every key as a string wi 阅读全文
摘要:
This problem requires add continues numbers, so the best solution is using prefix sum. Time complexity: O(n). class Solution { public boolean checkSub 阅读全文
摘要:
This is a similar problem with 398. Random Pick Index The following is my solution, which is easy to undersand: class Solution { int count = 0; Random 阅读全文
摘要:
This is a similar problem with: 382. Linked List Random Node The following is my solution, which is easy to understand: class Solution { Map<Integer,L 阅读全文
摘要:
Because the character can be duplicated, so we cannot use HashSet. This is easy if using bucket: public char findTheDifference(String s, String t) { i 阅读全文
摘要:
This problem can be solved by using two PriorityQueue(s), which is just the same solution as 295. Find Median from Data Stream. PriorityQueue<Integer> 阅读全文