leetcode
siriusli_
这个作者很懒,什么都没留下…
展开
-
[leetcode]944. Delete Columns to Make Sorted
Easy Related Topic: Greedy Problem: We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we delete all ...原创 2018-12-13 21:55:03 · 127 阅读 · 0 评论 -
[Lintcode]132. Word Search II /[Leetcode]212. Word Search II
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 dictionary, find all words in the board. Each word mus...原创 2019-02-18 22:51:00 · 147 阅读 · 0 评论 -
[Lintcode]120. Word Ladder /[Leetcode]127. Word Ladder
120. Word Ladder / 127. Word Ladder 本题难度: Hard/Medium Topic: Data Structure Description Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from st...原创 2019-03-26 02:15:09 · 127 阅读 · 0 评论 -
[Lintcode]136. Palindrome Partitioning /[Leetcode]131. Palindrome Partitioning
136. Palindrome Partitioning / 131. Palindrome Partitioning 本题难度: Medium Topic: Search DFS Description Given a string s, partition s such that every substring of the partition is a palindrome. Retur...原创 2019-03-27 01:50:27 · 101 阅读 · 0 评论 -
[Lintcode]108. Palindrome Partitioning II /[Leetcode]132. Palindrome Partitioning II
108. Palindrome Partitioning II / 132. Palindrome Partitioning II 本题难度: Medium/Hard Topic: DP Description Given a string s, partition s such that every substring of the partition is a palindrome. Re...原创 2019-03-27 02:29:03 · 109 阅读 · 0 评论 -
[Leetcode]62. Unique Paths
62. Unique Paths 本题难度: Easy Topic: Dynamic Programming Description A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either dow...原创 2019-03-27 02:34:43 · 109 阅读 · 0 评论 -
[Lintcode]115. Unique Paths II/[Leetcode]63. Unique Paths II
#115. Unique Paths II/63. Unique Paths II 本题难度: Easy/Medium Topic: Dynamic Programming Description Follow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many uniqu...原创 2019-03-27 02:37:33 · 138 阅读 · 0 评论 -
[Lintcode]739. 24 Game/[Leetcode]679. 24 Game
#[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 whether they could operated through*,/,+,...原创 2019-07-15 22:16:32 · 188 阅读 · 0 评论 -
[Leetcode]981. Time Based Key-Value Store
# [[Leetcode]981.Time Based Key-Value Store](https://leetcode.com/problems/time-based-key-value-store/) - 本题难度: Medium # Description Create a timebased key-value store classTimeMap, that supports...原创 2019-07-27 14:50:11 · 167 阅读 · 0 评论 -
[Leetcode]658. Find K Closest Elements
# [[Leetcode]658.Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements/) - 本题难度: Hard/Medium - Topic: Data Structure # Description # 我的代码 ```python import bisect class ...原创 2019-07-27 14:58:33 · 246 阅读 · 0 评论 -
[Leetcode]79. Word Search
79. Word Search 本题难度: Medium Topic: DFS Description Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “a...原创 2019-02-18 20:29:20 · 125 阅读 · 0 评论 -
[Lintcode]4. Ugly Number II/[Leetcode]264. Ugly Number II
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. Design an algorithm to find the nth ugly number. The...原创 2019-02-17 22:36:47 · 98 阅读 · 0 评论 -
[Leetcode]804. Unique Morse Code Words
Related Topic: String International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: “a” maps to “.-”, “b” maps to “-…”, “c” maps to “-.-....原创 2018-12-13 21:07:06 · 94 阅读 · 0 评论 -
[leetcode]15. 3Sum
15. 3Sum Description Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solutio...原创 2019-02-04 00:38:33 · 70 阅读 · 0 评论 -
[Leetcode]34. Find First and Last Position of Element in Sorted Array
34. Find First and Last Position of Element in Sorted Array Description Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your a...原创 2019-02-04 18:13:32 · 119 阅读 · 0 评论 -
[Leetcode]744. Find Smallest Letter Greater Than Target
744. Find Smallest Letter Greater Than Target Description Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in th...原创 2019-02-05 11:11:50 · 230 阅读 · 2 评论 -
[Lintcode]124. Longest Consecutive Sequence/[Leetcode]128. Longest Consecutive Sequence
124. Longest Consecutive Sequence/128. Longest Consecutive Sequence 本题难度: Medium/Hard Topic: Data Structure Description Given an unsorted array of integers, find the length of the longest consecutiv...原创 2019-02-17 15:14:18 · 97 阅读 · 0 评论 -
[Lintcode]128. Longest Consecutive Sequence/[Leetcode]23. Merge k Sorted Lists
128. Longest Consecutive Sequence / 23. Merge k Sorted Lists 本题难度: Hard/Medium Topic: Data Structure Description Merge k sorted linked lists and return it as one sorted list. Analyze and describe it...原创 2019-02-17 16:55:23 · 156 阅读 · 0 评论 -
[Lintcode] 40. Implement Queue by Two Stacks/[Leetcode]225. Implement Stack using Queues
40. Implement Queue by Two Stacks / 225. Implement Stack using Queues 本题难度: Medium/Easy Topic: Data Structure - stack/queue Description As the title described, you should only use two stacks to impl...原创 2019-02-17 20:13:06 · 133 阅读 · 0 评论 -
[Leetcode]225. Implement Stack using Queues
225. Implement Stack using Queues Implement the following operations of a stack using queues. push(x) – Push element x onto stack. pop() – Removes the element on top of the stack. top() – Get the top ...原创 2019-02-17 20:33:34 · 106 阅读 · 0 评论 -
[Lintcode]12. Min Stack /[Leetcode]155. Min Stack
12. Min Stack / 155. Min Stack 本题难度: Medium/Easy Topic: Data Structure Description import heapq import collections class MinStack: def __init__(self): """ initialize your data structure here...原创 2019-02-17 21:19:52 · 212 阅读 · 0 评论 -
[Leetcode]87. Scramble String
[[Leetcode]87.Scramble String](https://leetcode.com/problems/scramble-string/) - 本题难度: Hard - Topic: divide and conquere # Description Given a strings1, we may represent it as a binary tree by par...原创 2019-07-27 15:02:01 · 159 阅读 · 0 评论