摘要:
"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. 阅读全文
摘要:
"263. Ugly Number" 本题难度: Easy Topic: Data Structure Description 我的代码 阅读全文
摘要:
"12. Min Stack" / "155. Min Stack" 本题难度: Medium/Easy Topic: Data Structure Description import heapq import collections class MinStack: def __init__(se 阅读全文
摘要:
"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 阅读全文
摘要:
"40. Implement Queue by Two Stacks" / "225. Implement Stack using Queues" 本题难度: Medium/Easy Topic: Data Structure stack/queue Description As the title 阅读全文
摘要:
"128. Longest Consecutive Sequence" / "23. Merge k Sorted Lists" 本题难度: Hard/Medium Topic: Data Structure heap(别人的代码1用的是heap) Description Merge k sorte 阅读全文
摘要:
"124. Longest Consecutive Sequence" / "128. Longest Consecutive Sequence" 本题难度: Medium/Hard Topic: Data Structure Description Given an unsorted array 阅读全文
摘要:
"107. Word Break" / "139. Word Break" 本题难度: Medium Topic: Dynamic Programming Description Given a string s and a dictionary of words dict, determine i 阅读全文
摘要:
"109. Triangle" / "120. Triangle" 本题难度: Medium Topic: Dynamic Programming Description Given a triangle, find the minimum path sum from top to bottom. 阅读全文
摘要:
"118. Distinct Subsequences" / "115. Distinct Subsequences" 本题难度: Medium/Hard Topic: Dynamic Programming Description Given a string S and a string T, 阅读全文
摘要:
"119. Edit Distance" / "72. Edit Distance" 本题难度: Medium/Hard Topic: Dynamic Programming Description Given two words word1 and word2, find the minimum 阅读全文