Created
November 14, 2014 01:49
-
-
Save liruqi/45b6ed6610936312c33e to your computer and use it in GitHub Desktop.
本周六(11月15日)交流题目
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Leetcode: | |
1. Search for a Range | |
https://oj.leetcode.com/problems/search-for-a-range/ | |
2. Median of Two Sorted Arrays | |
https://oj.leetcode.com/problems/median-of-two-sorted-arrays/ | |
3. Longest Valid Parentheses | |
https://oj.leetcode.com/problems/longest-valid-parentheses/ | |
4. Copy List with Random Pointer | |
https://oj.leetcode.com/problems/copy-list-with-random-pointer/ | |
补充讨论: | |
1. 经典的小偷问题:一排房子,每个房子里有一定价值的东西,小偷不能偷相邻的两 | |
个房间。即如果小偷光临了房间i, 那么就不能再偷房间i - 1和房间i + 1。要求返回 | |
小偷能偷到东西的总价值的最大值。这是个经典DP问题, | |
A modified version of this problem is that all houses form a circle, whose | |
solution is very similar. We need to run DP twice. | |
2. Given a list of words, find two strings S & T such that: | |
a. S & T have no common character | |
b. S.length() * T.length() is maximized | |
Follow up: how to optimize and speed up your algorithm | |
3. Design a distributed LRU |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i figure out a solution for the question 1. F[n] = max{F[n-1],F[n-2]+v}