代码改变世界

阅读排行榜

[LeetCode] 257. Binary Tree Paths_ Easy tag: DFS

2018-07-13 23:42 by Johnson_强生仔仔, 273 阅读, 收藏,
摘要: Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: 3.2) Recursive 4.. Test cases 1) empty 2) 1 3) 阅读全文

[LeetCode] 207 Course Schedule_Medium tag: BFS, DFS

2018-07-05 06:08 by Johnson_强生仔仔, 273 阅读, 收藏,
摘要: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to 阅读全文

[LeetCode] 1143. Longest common subsequences_ Medium tag: Dynamic Programming

2019-04-28 02:27 by Johnson_强生仔仔, 272 阅读, 收藏,
摘要: Given two strings, find the longest common subsequence (LCS). Example Example 1: Input: "ABCD" and "EDCA" Output: 1 Explanation: LCS is 'A' or 'D' or 阅读全文

[LeetCode] 90.Subsets II tag: backtracking

2019-04-11 10:21 by Johnson_强生仔仔, 272 阅读, 收藏,
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文

[LeetCode] 122. Best Time to Buy and Sell Stock II_Easy tag: Dynamic Programming

2018-08-03 23:51 by Johnson_强生仔仔, 272 阅读, 收藏,
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 78 下一页