摘要: Lec2b 复合数据Compound Data Part 3 41" - 56" 从有理数类比到用二维坐标来表示点的位置,而两个点即可表示一个线(向量)。 1. 引入Closure(闭包)的概念 我的理解: 所有的object可以被“完整”地封装,作为其他object的一部分。这个过程可以无穷无尽地 阅读全文
posted @ 2021-10-19 01:27 siriusli 阅读(29) 评论(0) 推荐(0) 编辑
摘要: "[Leetcode]87. Scramble String" 本题难度: Hard Topic: divide and conquere Description Given a string s1, we may represent it as a binary tree by partition 阅读全文
posted @ 2019-07-27 15:02 siriusli 阅读(119) 评论(0) 推荐(0) 编辑
摘要: "[Leetcode]981. Time Based Key Value Store" 本题难度: Medium Description Create a timebased key value store class TimeMap, that supports two operations. 1 阅读全文
posted @ 2019-07-27 14:59 siriusli 阅读(122) 评论(0) 推荐(0) 编辑
摘要: "[Leetcode]658. Find K Closest Elements" 本题难度: Hard/Medium Topic: Data Structure Description 我的代码 python import bisect class Solution: def findClosest 阅读全文
posted @ 2019-07-27 14:58 siriusli 阅读(72) 评论(0) 推荐(0) 编辑
摘要: "Leetcode:932. Beautiful Array" 本题难度: Hard Topic: divide and conquer Description For some fixed N, an array A is beautiful if it is a permutation of t 阅读全文
posted @ 2019-07-27 14:47 siriusli 阅读(127) 评论(0) 推荐(0) 编辑
摘要: [Lintcode]739. 24 Game/[Leetcode]679. 24 Game 本题难度: Hard/Medium Description You have 4 cards each containing a number from 1 to 9. You need to judge w 阅读全文
posted @ 2019-07-15 22:17 siriusli 阅读(110) 评论(0) 推荐(0) 编辑
摘要: "108. Palindrome Partitioning II" / "132. Palindrome Partitioning II" 本题难度: Medium/Hard Topic: DP Description Given a string s, partition s such that 阅读全文
posted @ 2019-03-27 02:29 siriusli 阅读(110) 评论(0) 推荐(0) 编辑
摘要: "136. Palindrome Partitioning" / "131. Palindrome Partitioning" 本题难度: Medium Topic: Search DFS Description Given a string s, partition s such that eve 阅读全文
posted @ 2019-03-27 02:28 siriusli 阅读(103) 评论(0) 推荐(0) 编辑
摘要: "120. Word Ladder" / "127. Word Ladder" 本题难度: Hard/Medium Topic: Data Structure Description Given two words (start and end), and a dictionary, find th 阅读全文
posted @ 2019-03-26 02:15 siriusli 阅读(154) 评论(0) 推荐(0) 编辑
摘要: "132. Word Search II" / "212. Word Search II" 本题难度: Hard Topic: Data Structure Tire/DFS Description Given a 2D board and a list of words from the dict 阅读全文
posted @ 2019-02-18 22:51 siriusli 阅读(157) 评论(0) 推荐(0) 编辑