摘要: "4. Ugly Number II" / "264. Ugly Number II" 本题难度: Medium Topic: Data Structure Description Ugly number is a number that only have factors 2, 3 and 5. 阅读全文
posted @ 2019-02-17 22:36 siriusli 阅读(108) 评论(0) 推荐(0) 编辑
摘要: "263. Ugly Number" 本题难度: Easy Topic: Data Structure Description 我的代码 阅读全文
posted @ 2019-02-17 21:37 siriusli 阅读(107) 评论(0) 推荐(0) 编辑
摘要: "12. Min Stack" / "155. Min Stack" 本题难度: Medium/Easy Topic: Data Structure Description import heapq import collections class MinStack: def __init__(se 阅读全文
posted @ 2019-02-17 21:20 siriusli 阅读(88) 评论(0) 推荐(0) 编辑
摘要: "225. Implement Stack using Queues" Implement the following operations of a stack using queues. push(x) Push element x onto stack. pop() Removes the e 阅读全文
posted @ 2019-02-17 20:34 siriusli 阅读(113) 评论(0) 推荐(0) 编辑
摘要: "40. Implement Queue by Two Stacks" / "225. Implement Stack using Queues" 本题难度: Medium/Easy Topic: Data Structure stack/queue Description As the title 阅读全文
posted @ 2019-02-17 20:13 siriusli 阅读(133) 评论(0) 推荐(0) 编辑
摘要: "128. Longest Consecutive Sequence" / "23. Merge k Sorted Lists" 本题难度: Hard/Medium Topic: Data Structure heap(别人的代码1用的是heap) Description Merge k sorte 阅读全文
posted @ 2019-02-17 16:35 siriusli 阅读(128) 评论(0) 推荐(0) 编辑
摘要: "124. Longest Consecutive Sequence" / "128. Longest Consecutive Sequence" 本题难度: Medium/Hard Topic: Data Structure Description Given an unsorted array 阅读全文
posted @ 2019-02-17 15:15 siriusli 阅读(133) 评论(0) 推荐(0) 编辑
摘要: "107. Word Break" / "139. Word Break" 本题难度: Medium Topic: Dynamic Programming Description Given a string s and a dictionary of words dict, determine i 阅读全文
posted @ 2019-02-17 03:46 siriusli 阅读(140) 评论(0) 推荐(0) 编辑
摘要: "109. Triangle" / "120. Triangle" 本题难度: Medium Topic: Dynamic Programming Description Given a triangle, find the minimum path sum from top to bottom. 阅读全文
posted @ 2019-02-17 02:54 siriusli 阅读(123) 评论(0) 推荐(0) 编辑
摘要: "118. Distinct Subsequences" / "115. Distinct Subsequences" 本题难度: Medium/Hard Topic: Dynamic Programming Description Given a string S and a string T, 阅读全文
posted @ 2019-02-17 02:22 siriusli 阅读(144) 评论(0) 推荐(0) 编辑
摘要: "119. Edit Distance" / "72. Edit Distance" 本题难度: Medium/Hard Topic: Dynamic Programming Description Given two words word1 and word2, find the minimum 阅读全文
posted @ 2019-02-17 01:15 siriusli 阅读(206) 评论(0) 推荐(0) 编辑