English | 简体中文
common and interview algorithms in different languages
question_01:https://github.com/yunshuipiao/sw-algorithms/blob/master/questions_01.md
question_02:https://github.com/yunshuipiao/algorithms/blob/master/README_CN.md
and so on
category | question | java | python | javascript | go | c++ | kotlin |
---|---|---|---|---|---|---|---|
array | Rotate Array | 👍 | |||||
Contains Duplicate | 👍 | ||||||
Find Peak Element | 👍 | ||||||
Maximum | 👍 | ||||||
kth Largest Element in An Array | 👍 | ||||||
Fin All Duplicates in an Array | 👍 | ||||||
Longest increasing Subsequence | 👍 | ||||||
Rotate Image, matrix | 👍 | ||||||
Shuffle an Array | 👍 | ||||||
Find Min in Rotated Array | 👍 | ||||||
Search in Rotate Array | 👍 | ||||||
Circular Counter | 👍 | ||||||
Flatten | 👍 | ||||||
Garage | 👍 | ||||||
Longest No Repeat | 👍 | ||||||
Merge Intervals | 👍 | ||||||
Missing Ranges | 👍 | ||||||
Plus One | 👍 | ||||||
Summary Ranges | 👍 | ||||||
Three Sum | 👍 | ||||||
Two Sum | 👍 | ||||||
Linked List | Singly Linked List Implementation | 👍 | |||||
Double Linked List Implementation | 👍 | ||||||
Delete Node in a Linked List | 👍 | ||||||
Palindrome Linked List | 👍 | ||||||
Reverse Linked List | 👍 | ||||||
Intersection of Two Linked Lists | 👍 | ||||||
Linked List Cycle | 👍 | ||||||
Remove Nth Node From End of List | 👍 | ||||||
Merge Sort List | 👍 | ||||||
Find Linked List Cycle | 👍 | ||||||
Merge k Sorted Lists | 👍 | ||||||
add_two_numbers | 👍 | ||||||
copy_random_pointer | 👍 | ||||||
Binary Tree | Binary Tree Level Order Traversal | 👍 | |||||
Sum of Left Leaves | 👍 | ||||||
Invert Binary Tree | 👍 | ||||||
Binary Search Tree Iterator | 👍 | ||||||
Binary Tree Postorder Travelsal | 👍 | ||||||
Binary Tree Preorder Travelsal | 👍 | ||||||
Flatten Binary Tree to Linked List | 👍 | ||||||
Symmtric Tree | 👍 | ||||||
Binary Tree Inorder Travelsal | 👍 | ||||||
Same Tree | 👍 | ||||||
Maximum Depth of Binary Tree | 👍 | ||||||
Binary Tree Paths | 👍 | ||||||
Balanced Binary Tree | 👍 | ||||||
Minimum Depth of Binary Tree | 👍 | ||||||
Sorted List to Balanced Binary Search Tree | 👍 | ||||||
Validate Binary Search Tree | 👍 | ||||||
Sorted Array to Balanced Bst | 👍 | ||||||
Kth Smallest Element in a Bst | 👍 | ||||||
Binary Tree Zigzag Level Order Travelsal | 👍 | ||||||
Delete Node in a Bst | 👍 | ||||||
Lowest Common Ancestor of BST | 👍 | ||||||
Binary Tree Left Side View | 👍 | ||||||
Binary Tree Right Side View | |||||||
Mode in Bst | |||||||
Most Frequent Subtree Sum | |||||||
Find Largest Element in Each Row | |||||||
Serialize and Deserialize BT | |||||||
Math | Integer Break | 👍 | |||||
Reverse Bits | 👍 | ||||||
Palindrome Number | 👍 | ||||||
Math.Pow | 👍 | ||||||
Jug and Water Problem | 👍 | ||||||
Sieve of Eratosthenses | 👍 | ||||||
Fermat's primality | |||||||
Evaluate Reverse Polish Notation | 👍 | ||||||
Stack and Queue | Min Stack | 👍 | |||||
Min Queue | 👍 | ||||||
Implement Stack Using Queue | 👍 | ||||||
Implement Queue Using Stack | 👍 | ||||||
Sort Stack | 👍 | ||||||
DP | Fibonacci Numbers | 👍 | |||||
Word Break | 👍 | ||||||
Subset Sum | 👍 | ||||||
0/1 Knapsack Problem | 👍 | ||||||
Shortest Palindrome(KMP) | 👍 | ||||||
Mininum Square Sum | 👍 | ||||||
Maximum Weight transformation of a String | 👍 | ||||||
Coin Change | 👍 | ||||||
buy_sell_stock | 👍 | ||||||
climbing_stairs | |||||||
combination_sum | 👍 | ||||||
house_robber | 👍 | ||||||
longest_inscreasing | 👍 | ||||||
max_product_subarray | 👍 | ||||||
max_sum_subarray | 👍 | ||||||
num_decodings | 👍 | ||||||
regex_matching | 👍 | ||||||
Sort And Search | Bubble Sort | 👍 | |||||
Insertion Sort | 👍 | ||||||
Selection Sort | 👍 | ||||||
Counting Sort | 👍 | ||||||
Binary Search, Lower & Upper Bounds | 👍 | ||||||
MergeSort | 👍 | ||||||
QuickSort | 👍 | ||||||
String | Ransom Note | ||||||
Reverse String | 👍 | ||||||
Longest Common Prefix | 👍 | ||||||
Is Anagram | 👍 | ||||||
Needle and Haystack | |||||||
Word Break | |||||||
Mate Strings | |||||||
Rabin karp Subsequence search | 👍 | ||||||
add_binary | 👍 | ||||||
decode_string | 👍 | ||||||
encode_decode | 👍 | ||||||
int_to_roman | 👍 | ||||||
is_palindrome | 👍 | ||||||
make_sentence | 👍 | ||||||
rabin_karp | 👍 | ||||||
reverse_string | 👍 | ||||||
Tree | BST(recursive) | 👍 | |||||
BST(iterative) | 👍 | ||||||
AVL Tree(BBST) | 👍 | ||||||
Trie(Prefix tree) | 👍 | ||||||
Hashed Array Tree | |||||||
LRU Cache | 👍 | ||||||
Segment Tree | 👍 | ||||||
binary_tree_paths | 👍 | ||||||
BackTrack | Anagram | 👍 | |||||
Array Sum Combinations | 👍 | ||||||
Combination Sum | 👍 | ||||||
Expression Add Operators | 👍 | ||||||
Factor Combinations | 👍 | ||||||
Generate Abbreviations | 👍 | ||||||
Generate Parentesis | 👍 | ||||||
Letter Combination | 👍 | ||||||
Palindrome Partitioning | 👍 | ||||||
Pattern Match | 👍 | ||||||
Permute | 👍 | ||||||
Permute Unique | 👍 | ||||||
subsets | 👍 | ||||||
subsets_uniques | 👍 | ||||||
bit | bytes_int_conversion | 👍 | |||||
count_ones | 👍 | ||||||
find_missing_number | 👍 | ||||||
power_of_two | 👍 | ||||||
reverse_bits | 👍 | ||||||
single_number | 👍 | ||||||
subsets | 👍 | ||||||
add_without_operator | 👍 | ||||||
dfs | all_factors | 👍 | |||||
count_islands | 👍 | ||||||
pacific_atlantic | |||||||
sudoku_solver | 👍 | ||||||
walls_and_gates | 👍 | ||||||
heap | merge_sorted_k_lists | 👍 | |||||
sliding_window_max | 👍 | ||||||
map | HashTable | 👍 | |||||
math | gcd | 👍 | |||||
nth_digit | 👍 | ||||||
prime_test | 👍 | ||||||
queue | max_sliding_window | 👍 | |||||
queue | 👍 | ||||||
reconstruct_queue | 👍 | ||||||
search | binary_search | 👍 | |||||
first_search | 👍 | ||||||
last_search | 👍 | ||||||
sort | comb_sort | 👍 | |||||
sort_colors | 👍 | ||||||
top_sort | 👍 | ||||||
stack | stack | 👍 | |||||
valid_parenthesis | 👍 |
Folder structure should be like this : Language/category/file
Example:
- python/sort_search/quick_sort
- python/array/rotate_array
Did you find a bug?
any way to do it better?
any question to add it?
any another language to do it ?
please feel free to pull-request it :)