My implementation of useful data structures, algorithms
This repository contains my implementation of useful data structures, algorithms.
- If a file name starts with 'lc', it's a problem from leetcode.com
- If a file name starts with 'hr', it's a problem from hackerrank.com
- If a file name starts with 'g4g', it's a problem from geeksforgeeks.org
- Otherswise, it's a problem from both hackerrank and leetcode, or just a problem
Written in Python3, Swift and Go. This project is heavily inspired by Chip Huyen, thanks !
- Array Left rotation (hr_arrays_left_rotation.go)
- Merge Sorted Array (lc_merge_sorted_array.py)
- Shortest Unsorted Continuous Subarray (lc_shortest_unsorted_continuous_subarray.go)
- Squares of a Sorted Array (lc_squares_of_a_sorted_array.go)
- Best Time to Buy and Sell Stock (lc_best_time_2_buy_sell_stock.go)
- Coin change
- Edit Distance (lc_edit_distance.go)
- Longest Common Subsequence (lc_longest_common_subsequence.py)
- Longest Palindromic Substring (lc_longest_palindromic_substring.go)
- Merge k Sorted Lists
- Merge k Unlinked Sorted Lists
- Unique Paths (lc_unique_paths.py)
- Add Two Numbers (hc_add_two_numbers.go)
- Cycle detection (cycle_detection.py)
- Delete a node (hr_delete_a_node.py)
- Delete duplicate-value nodes from a sorted linked list (hr_del_duplicate_value_nodes_from_sorted_linked_list.py)
- Intersection of Two Linked Lists (lc_intersection_of_2_linked_lists.go)
- Palindrome Linked List (lc_palindrome_linked_list.go)
- Partition List (lc_partition_list.go)
- Remove Linked List Elements (hc_remove_linked_list_elements.go)
- Reverse a linked list (reverse_linked_list.py)
- Maximum Binary Tree (lc_maximum_binary_tree.go)
- Subtree of Another Tree (lc_subtree_of_another_tree.go)