-
Notifications
You must be signed in to change notification settings - Fork 46
Pull requests: keep-practicing/leetcode-go
Pull requests list
add brute force solution for 0001-two-sum
array
An array is stored such that the position of each element can be computed from its index
#85
by zwfang
was merged Oct 4, 2019
Loading...
another code for subarray product less than k sliding window solution
array
An array is stored such that the position of each element can be computed from its index
Medium
Coefficient of difficulty medium
sliding window
A sliding window is a sub-list that runs over an underlying collection.
136. Single Number🖖
array
An array is stored such that the position of each element can be computed from its index
bit manipulation
the act of algorithmically manipulating bits or other pieces of data shorter than a word
Easy
Coefficient of difficulty easy
Hash Table(Map)
a structure that can map keys to values.
#74
by zwfang
was merged Feb 1, 2019
Loading...
179. Largest Number
array
An array is stored such that the position of each element can be computed from its index
Medium
Coefficient of difficulty medium
sort
Sorting algorithm is an algorithm that puts elements of a list in a certain order.
string
A string is used to represent text. It is comprised of a set of characters.
#68
by zwfang
was merged Jan 14, 2019
Loading...
219. Contains Duplicate II
array
An array is stored such that the position of each element can be computed from its index
Easy
Coefficient of difficulty easy
Hash Table(Map)
a structure that can map keys to values.
#55
by zwfang
was merged Jan 7, 2019
Loading...
217. Contains Duplicate
array
An array is stored such that the position of each element can be computed from its index
Easy
Coefficient of difficulty easy
#54
by zwfang
was merged Jan 7, 2019
Loading...
79. Word Search
array
An array is stored such that the position of each element can be computed from its index
Backtracking
incrementally builds candidates to the solutions, and abandons a candidate(invalid solution.)
Medium
Coefficient of difficulty medium
#40
by zwfang
was merged Jan 4, 2019
Loading...
53. Maximum Subarray
array
An array is stored such that the position of each element can be computed from its index
dynamic programming
optimal substructure and overlapping sub-problem are two key attributes for dynamic programming.
Easy
Coefficient of difficulty easy
#36
by zwfang
was merged Jan 2, 2019
Loading...
48. Rotate Image
array
An array is stored such that the position of each element can be computed from its index
Medium
Coefficient of difficulty medium
#35
by zwfang
was merged Jan 2, 2019
Loading...
35. Search Insert Position
array
An array is stored such that the position of each element can be computed from its index
binary search
a search algorithm that finds the position of target value within a sorted array.
Easy
Coefficient of difficulty easy
#34
by zwfang
was merged Jan 2, 2019
Loading...
23. Merge k Sorted Lists
array
An array is stored such that the position of each element can be computed from its index
Hard
Coefficient of difficulty is hard
heap(priority queue)
a heap is a specialized tree-based data structure which is essentially an almost complete tree
Linked List
A Linked list is a linear data structure where each element is a separate object.
#31
by zwfang
was merged Jan 2, 2019
Loading...
674. Longest Continuous Increasing Subsequence
array
An array is stored such that the position of each element can be computed from its index
Easy
Coefficient of difficulty easy
#25
by zwfang
was merged Dec 30, 2018
Loading...
4. Median of Two Sorted Arrays
array
An array is stored such that the position of each element can be computed from its index
binary search
a search algorithm that finds the position of target value within a sorted array.
Divide and Conquer
recursively breaking down a problem into two or more sub-problem of the same or related type.
Hard
Coefficient of difficulty is hard
Recursion
solution depends on solutions to smaller instances of the same problem.
#24
by zwfang
was merged Dec 30, 2018
Loading...
717. 1-bit and 2-bit Characters
array
An array is stored such that the position of each element can be computed from its index
Easy
Coefficient of difficulty easy
#23
by zwfang
was merged Dec 29, 2018
Loading...
122. Best Time to Buy and Sell Stock II
array
An array is stored such that the position of each element can be computed from its index
Easy
Coefficient of difficulty easy
Greedy algorithm
making the locally optimal choice at each stage with the intent of finding the global optimum.
#22
by zwfang
was merged Dec 29, 2018
Loading...
121. Best Time to Buy and Sell Stock
array
An array is stored such that the position of each element can be computed from its index
dynamic programming
optimal substructure and overlapping sub-problem are two key attributes for dynamic programming.
Easy
Coefficient of difficulty easy
#21
by zwfang
was merged Dec 28, 2018
Loading...
303. Range Sum Query - Immutable
array
An array is stored such that the position of each element can be computed from its index
Easy
Coefficient of difficulty easy
#20
by zwfang
was merged Dec 28, 2018
Loading...
713 subarray product less than k solved.
array
An array is stored such that the position of each element can be computed from its index
Medium
Coefficient of difficulty medium
sliding window
A sliding window is a sub-list that runs over an underlying collection.
#19
by zwfang
was merged Dec 28, 2018
Loading...
11 container with most water solved.
array
An array is stored such that the position of each element can be computed from its index
double index(two pointers)
The Two Pointer Algorithm
#18
by zwfang
was merged Dec 26, 2018
Loading...
215 kth largest element in an array
array
An array is stored such that the position of each element can be computed from its index
heap(priority queue)
a heap is a specialized tree-based data structure which is essentially an almost complete tree
sort
Sorting algorithm is an algorithm that puts elements of a list in a certain order.
#14
by zwfang
was merged Dec 22, 2018
Loading...
88 merge sorted array solved
array
An array is stored such that the position of each element can be computed from its index
double index(two pointers)
The Two Pointer Algorithm
sort
Sorting algorithm is an algorithm that puts elements of a list in a certain order.
#13
by zwfang
was merged Dec 22, 2018
Loading...
75 sort colors solved
array
An array is stored such that the position of each element can be computed from its index
double index(two pointers)
The Two Pointer Algorithm
sort
Sorting algorithm is an algorithm that puts elements of a list in a certain order.
#12
by zwfang
was merged Dec 21, 2018
Loading...
80 remove duplicates 2 solved
array
An array is stored such that the position of each element can be computed from its index
double index(two pointers)
The Two Pointer Algorithm
#11
by zwfang
was merged Dec 21, 2018
Loading...
ProTip!
Follow long discussions with comments:>50.