Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/readme doc #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# Books
# Algorithm in Python

this Repo contains solutions to different sorting algorithms written in python
This project contains various common algorithms implemented in Python for learning purposes. The algorithms are organized into different categories:

## Table of Content
| Category | Algorithm |
|------------------|----------------------------------------------------------------------------------------|
| Array | [Circular Counter](https://github.com/DSC-Unilag/Algorithms/blob/master/array/circular_counter.py)<br>[Flatten](https://github.com/DSC-Unilag/Algorithms/blob/master/array/flatten.py)<br>[Garage](https://github.com/DSC-Unilag/Algorithms/blob/master/array/garage.py)<br>[Longest Non Repeat](https://github.com/DSC-Unilag/Algorithms/blob/master/array/longest_non_repeat.py)<br>[Merge Intervals](https://github.com/DSC-Unilag/Algorithms/blob/master/array/merge_intervals.py)<br>[Missing Ranges](https://github.com/DSC-Unilag/Algorithms/blob/master/array/missing_ranges.py)<br>[Plus One](https://github.com/DSC-Unilag/Algorithms/blob/master/array/plus_one.py)<br>[Rotate Array](https://github.com/DSC-Unilag/Algorithms/blob/master/array/rotate_array.py)<br>[Summary Ranges](https://github.com/DSC-Unilag/Algorithms/blob/master/array/summary_ranges.py)<br>[Three Sum](https://github.com/DSC-Unilag/Algorithms/blob/master/array/three_sum.py)<br>[Two Sum](https://github.com/DSC-Unilag/Algorithms/blob/master/array/two_sum.py)<br> |
| Backtrack | [Anagram](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/anagram.py)<br>[Array Sum Combinations](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/array_sum_combinations.py)<br>[Combination Sum](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/combination_sum.py)<br>[Expression Add Operators](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/expression_add_operators.py)<br>[Factor Combinations](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/factor_combinations.py)<br>[General Solution.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/general_solution.md)<br>[Generate Abbreviations](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/generate_abbreviations.py)<br>[Generate Parenthesis](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/generate_parenthesis.py)<br>[Letter Combination](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/letter_combination.py)<br>[Palindrome Partitioning](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/palindrome_partitioning.py)<br>[Pattern Match](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/pattern_match.py)<br>[Permute](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/permute.py)<br>[Permute Unique](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/permute_unique.py)<br>[Subsets](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/subsets.py)<br>[Subsets Unique](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/subsets_unique.py)<br>[Word Search](https://github.com/DSC-Unilag/Algorithms/blob/master/backtrack/word_search.py)<br> |
| BFS | [Shortest Distance From All Buildings](https://github.com/DSC-Unilag/Algorithms/blob/master/bfs/shortest_distance_from_all_buildings.py)<br>[Word Ladder](https://github.com/DSC-Unilag/Algorithms/blob/master/bfs/word_ladder.py)<br> |
| Bit | [Add Without Operator](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/add_without_operator.py)<br>[Bytes Int Conversion](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/bytes_int_conversion.py)<br>[Count Ones](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/count_ones.py)<br>[Find Missing Number](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/find_missing_number.py)<br>[Power Of Two](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/power_of_two.py)<br>[Reverse Bits](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/reverse_bits.py)<br>[Single Number](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/single_number.py)<br>[Single Number2](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/single_number2.py)<br>[Subsets](https://github.com/DSC-Unilag/Algorithms/blob/master/bit/subsets.py)<br> |
| Calculator | [Math Parser](https://github.com/DSC-Unilag/Algorithms/blob/master/calculator/math_parser.py)<br> |
| Design | [Lrucache.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/LRUcache.md)<br>[Alarm System.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/alarm_system.md)<br>[All O One Ds.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/all_o_one_ds.md)<br>[Calculator.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/calculator.md)<br>[Excel Table.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/excel_table.md)<br>[Nearby Drivers.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/nearby_drivers.md)<br>[Ride Sharing.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/ride_sharing.md)<br>[Task Runner.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/task_runner.md)<br>[Twitter Feeds.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/design/twitter_feeds.md)<br> |
| DFS | [All Factors](https://github.com/DSC-Unilag/Algorithms/blob/master/dfs/all_factors.py)<br>[Count Islands](https://github.com/DSC-Unilag/Algorithms/blob/master/dfs/count_islands.py)<br>[Pacific Atlantic](https://github.com/DSC-Unilag/Algorithms/blob/master/dfs/pacific_atlantic.py)<br>[Sudoku Solver](https://github.com/DSC-Unilag/Algorithms/blob/master/dfs/sudoku_solver.py)<br>[Walls And Gates](https://github.com/DSC-Unilag/Algorithms/blob/master/dfs/walls_and_gates.py)<br> |
| DP | [Buy Sell Stock](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/buy_sell_stock.py)<br>[Climbing Stairs](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/climbing_stairs.py)<br>[Combination Sum](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/combination_sum.py)<br>[House Robber](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/house_robber.py)<br>[Knapsack](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/knapsack.py)<br>[Longest Increasing](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/longest_increasing.py)<br>[Max Product Subarray](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/max_product_subarray.py)<br>[Max Subarray](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/max_subarray.py)<br>[Num Decodings](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/num_decodings.py)<br>[Regex Matching](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/regex_matching.py)<br>[Word Break](https://github.com/DSC-Unilag/Algorithms/blob/master/dp/word_break.py)<br> |
| Graph | [Clone Graph](https://github.com/DSC-Unilag/Algorithms/blob/master/graph/clone_graph.py)<br>[Cycle Detection](https://github.com/DSC-Unilag/Algorithms/blob/master/graph/cycle_detection.py)<br>[Find Path](https://github.com/DSC-Unilag/Algorithms/blob/master/graph/find_path.py)<br>[Graph](https://github.com/DSC-Unilag/Algorithms/blob/master/graph/graph.py)<br>[Traversal](https://github.com/DSC-Unilag/Algorithms/blob/master/graph/traversal.py)<br> |
| Heap | [Merge Sorted K Lists](https://github.com/DSC-Unilag/Algorithms/blob/master/heap/merge_sorted_k_lists.py)<br>[Skyline](https://github.com/DSC-Unilag/Algorithms/blob/master/heap/skyline.py)<br>[Sliding Window Max](https://github.com/DSC-Unilag/Algorithms/blob/master/heap/sliding_window_max.py)<br> |
| Linked List | [Add Two Numbers](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/add_two_numbers.py)<br>[Copy Random Pointer](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/copy_random_pointer.py)<br>[Delete Node](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/delete_node.py)<br>[First Cyclic Node](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/first_cyclic_node.py)<br>[Is Cyclic](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/is_cyclic.py)<br>[Is Palindrome](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/is_palindrome.py)<br>[Kth To Last](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/kth_to_last.py)<br>[Linkedlist](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/linkedlist.py)<br>[Remove Duplicates](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/remove_duplicates.py)<br>[Reverse](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/reverse.py)<br>[Rotate List](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/rotate_list.py)<br>[Swap In Pairs](https://github.com/DSC-Unilag/Algorithms/blob/master/linkedlist/swap_in_pairs.py)<br> |
| Map | [Hashtable](https://github.com/DSC-Unilag/Algorithms/blob/master/map/hashtable.py)<br>[Longest Common Subsequence](https://github.com/DSC-Unilag/Algorithms/blob/master/map/longest_common_subsequence.py)<br>[Randomized Set](https://github.com/DSC-Unilag/Algorithms/blob/master/map/randomized_set.py)<br>[Valid Sudoku](https://github.com/DSC-Unilag/Algorithms/blob/master/map/valid_sudoku.py)<br> |
| Math | [Extended Gcd](https://github.com/DSC-Unilag/Algorithms/blob/master/math/extended_gcd.py)<br>[Gcd](https://github.com/DSC-Unilag/Algorithms/blob/master/math/gcd.py)<br>[Generate Strobogrammtic](https://github.com/DSC-Unilag/Algorithms/blob/master/math/generate_strobogrammtic.py)<br>[Is Strobogrammatic](https://github.com/DSC-Unilag/Algorithms/blob/master/math/is_strobogrammatic.py)<br>[Nth Digit](https://github.com/DSC-Unilag/Algorithms/blob/master/math/nth_digit.py)<br>[Prime Test](https://github.com/DSC-Unilag/Algorithms/blob/master/math/prime_test.py)<br>[Primes Sieve Of Eratosthenes](https://github.com/DSC-Unilag/Algorithms/blob/master/math/primes_sieve_of_eratosthenes.py)<br>[Pythagoras](https://github.com/DSC-Unilag/Algorithms/blob/master/math/pythagoras.py)<br>[Rabin Miller](https://github.com/DSC-Unilag/Algorithms/blob/master/math/rabin_miller.py)<br>[Rsa](https://github.com/DSC-Unilag/Algorithms/blob/master/math/rsa.py)<br>[Sqrt Precision Factor](https://github.com/DSC-Unilag/Algorithms/blob/master/math/sqrt_precision_factor.py)<br> |
| Matrix | [Bomb Enemy](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/bomb_enemy.py)<br>[Count Paths](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/count_paths.py)<br>[Matrix Rotation.Txt](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/matrix_rotation.txt)<br>[Rotate Image](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/rotate_image.py)<br>[Search In Sorted Matrix](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/search_in_sorted_matrix.py)<br>[Sparse Dot Vector](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/sparse_dot_vector.py)<br>[Sparse Mul](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/sparse_mul.py)<br>[Spiral Traversal](https://github.com/DSC-Unilag/Algorithms/blob/master/matrix/spiral_traversal.py)<br> |
| Queue | [ Init ](https://github.com/DSC-Unilag/Algorithms/blob/master/queue/__init__.py)<br>[Max Sliding Window](https://github.com/DSC-Unilag/Algorithms/blob/master/queue/max_sliding_window.py)<br>[Moving Average](https://github.com/DSC-Unilag/Algorithms/blob/master/queue/moving_average.py)<br>[Queue](https://github.com/DSC-Unilag/Algorithms/blob/master/queue/queue.py)<br>[Reconstruct Queue](https://github.com/DSC-Unilag/Algorithms/blob/master/queue/reconstruct_queue.py)<br>[Zigzagiterator](https://github.com/DSC-Unilag/Algorithms/blob/master/queue/zigzagiterator.py)<br> |
| Search | [Binary Search](https://github.com/DSC-Unilag/Algorithms/blob/master/search/binary_search.py)<br>[First Occurance](https://github.com/DSC-Unilag/Algorithms/blob/master/search/first_occurance.py)<br>[Last Occurance](https://github.com/DSC-Unilag/Algorithms/blob/master/search/last_occurance.py)<br> |
| Set | [Randomized Set](https://github.com/DSC-Unilag/Algorithms/blob/master/set/randomized_set.py)<br> |
| Sort | [Bubble Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/bubble_sort.py)<br>[Counting Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/counting_sort.py)<br>[Heap Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/heap_sort.py)<br>[Insertion Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/insertion_sort.py)<br>[Meeting Rooms](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/meeting_rooms.py)<br>[Merge Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/merge_sort.py)<br>[Quick Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/quick_sort.py)<br>[Selection Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/selection_sort.py)<br>[Sort Colors](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/sort_colors.py)<br>[Topsort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/topsort.py)<br>[Wiggle Sort](https://github.com/DSC-Unilag/Algorithms/blob/master/sort/wiggle_sort.py)<br> |
| Stack | [ Init ](https://github.com/DSC-Unilag/Algorithms/blob/master/stack/__init__.py)<br>[Longest Abs Path](https://github.com/DSC-Unilag/Algorithms/blob/master/stack/longest_abs_path.py)<br>[Simplify Path](https://github.com/DSC-Unilag/Algorithms/blob/master/stack/simplify_path.py)<br>[Stack](https://github.com/DSC-Unilag/Algorithms/blob/master/stack/stack.py)<br>[Valid Parenthesis](https://github.com/DSC-Unilag/Algorithms/blob/master/stack/valid_parenthesis.py)<br> |
| String | [Add Binary](https://github.com/DSC-Unilag/Algorithms/blob/master/string/add_binary.py)<br>[Breaking Bad](https://github.com/DSC-Unilag/Algorithms/blob/master/string/breaking_bad.py)<br>[Decode String](https://github.com/DSC-Unilag/Algorithms/blob/master/string/decode_string.py)<br>[Encode Decode](https://github.com/DSC-Unilag/Algorithms/blob/master/string/encode_decode.py)<br>[Group Anagrams](https://github.com/DSC-Unilag/Algorithms/blob/master/string/group_anagrams.py)<br>[Int To Roman](https://github.com/DSC-Unilag/Algorithms/blob/master/string/int_to_roman.py)<br>[Is Palindrome](https://github.com/DSC-Unilag/Algorithms/blob/master/string/is_palindrome.py)<br>[License Number](https://github.com/DSC-Unilag/Algorithms/blob/master/string/license_number.py)<br>[Make Sentence](https://github.com/DSC-Unilag/Algorithms/blob/master/string/make_sentence.py)<br>[Multiply Strings](https://github.com/DSC-Unilag/Algorithms/blob/master/string/multiply_strings.py)<br>[One Edit Distance](https://github.com/DSC-Unilag/Algorithms/blob/master/string/one_edit_distance.py)<br>[Rabin Karp](https://github.com/DSC-Unilag/Algorithms/blob/master/string/rabin_karp.py)<br>[Reverse String](https://github.com/DSC-Unilag/Algorithms/blob/master/string/reverse_string.py)<br>[Reverse Vowel](https://github.com/DSC-Unilag/Algorithms/blob/master/string/reverse_vowel.py)<br>[Reverse Words](https://github.com/DSC-Unilag/Algorithms/blob/master/string/reverse_words.py)<br>[Roman To Int](https://github.com/DSC-Unilag/Algorithms/blob/master/string/roman_to_int.py)<br>[Word Squares](https://github.com/DSC-Unilag/Algorithms/blob/master/string/word_squares.py)<br> |
| TMP | [Temporary.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/tmp/temporary.md)<br>[Tree.Md](https://github.com/DSC-Unilag/Algorithms/blob/master/tree.md)<br> |
| Tree | [**Segment Tree Folder**](https://github.com/DSC-Unilag/Algorithms/tree/master/tree/Segment_Tree)<br>[Binary Tree Paths](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/binary_tree_paths.py)<br>[Bintree2List](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/bintree2list.py)<br>[**Bst Folder**](https://github.com/DSC-Unilag/Algorithms/tree/master/tree/bst)<br>[Deepest Left](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/deepest_left.py)<br>[Invert Tree](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/invert_tree.py)<br>[Is Balanced](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/is_balanced.py)<br>[Is Subtree](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/is_subtree.py)<br>[Is Symmetric](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/is_symmetric.py)<br>[Longest Consecutive](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/longest_consecutive.py)<br>[Lowest Common Ancestor](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/lowest_common_ancestor.py)<br>[Max Height](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/max_height.py)<br>[Max Path Sum](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/max_path_sum.py)<br>[Min Height](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/min_height.py)<br>[Path Sum](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/path_sum.py)<br>[Path Sum2](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/path_sum2.py)<br>[Pretty Print](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/pretty_print.py)<br>[Same Tree](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/same_tree.py)<br>[**Traversal Folder**](https://github.com/DSC-Unilag/Algorithms/tree/master/tree/traversal)<br>[Tree](https://github.com/DSC-Unilag/Algorithms/blob/master/tree/tree.py)<br>[**Trie**](https://github.com/DSC-Unilag/Algorithms/tree/master/tree/trie)<br> |
| Union Find | [Count Islands](https://github.com/DSC-Unilag/Algorithms/blob/master/union-find/count_islands.py)<br>
Loading