{"id":18756838,"url":"https://github.com/code-shoily/ex_algo","last_synced_at":"2025-04-13T02:03:50.067Z","repository":{"id":43349482,"uuid":"430171663","full_name":"code-shoily/ex_algo","owner":"code-shoily","description":"Data Structures and Algorithms implemented with Elixir","archived":false,"fork":false,"pushed_at":"2022-11-30T22:34:51.000Z","size":89,"stargazers_count":48,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-13T02:03:09.410Z","etag":null,"topics":["algorithms","data-structures","elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-shoily.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-20T17:51:51.000Z","updated_at":"2024-11-27T14:12:55.000Z","dependencies_parsed_at":"2023-01-21T20:01:22.737Z","dependency_job_id":null,"html_url":"https://github.com/code-shoily/ex_algo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fex_algo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fex_algo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fex_algo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Fex_algo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-shoily","download_url":"https://codeload.github.com/code-shoily/ex_algo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654090,"owners_count":21140236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-structures","elixir"],"created_at":"2024-11-07T17:38:16.288Z","updated_at":"2025-04-13T02:03:50.006Z","avatar_url":"https://github.com/code-shoily.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExAlgo\n\n`ExAlgo` is a collection of data structures and algorithms implemented in Elixir. This is the authors attempt to see algorithms through Elixir's lens.\n\nThe sole purpose of this is to use as a learning tool for algorithms in a functional language set-up. I am also thinking of using this to host some algorithms that could come in handy while solving Advent of Code. Almost all algorithms mentioned here have well tested and production ready libraries so I see little use that anyone would want to use this for anything serious.\n\n## Development\n\nDownload this repo and get the dependencies with `mix deps.get`. Go to `iex -S mix` to try out the algorithms in the REPL. `mix test` runs all the tests.\n\n## Detailed Documentation\n\nTODO - Add ex_doc pages with detailed explanations of each categories.\n\n## Catalogue\n\n### Graph\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n\n### Heap\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n\n### List\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Linked List | [linked_list.ex](lib/ex_algo/list/linked_list.ex) | [Yes](test/ex_algo/list/linked_list_test.exs) | No | | |\n| Circular List | [circular_list.ex](lib/ex_algo/list/circular_list.ex) | [Yes](test/ex_algo/list/circular_list_test.exs) | No | | |\n| BidirectionalList | [bidirectional_list.ex](lib/ex_algo/list/bidirectional_list.ex) | [Yes](test/ex_algo/list/bidirectional_list_test.exs) | No | | WIP |\n| Maximum Subarray Sum | [algorithms.ex](lib/ex_algo/list/algorithms.ex) | [Yes](test/ex_algo/list/algorithms_test.exs) | No | | Kadane's Algorithm |\n\n### Functional/Immutable\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n\n### Queue\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Queue | [queue.ex](lib/ex_algo/queue/queue.ex) | [Yes](test/ex_algo/queue/queue_test.exs) | No | | |\n\n### Search\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Binary Search | [binary_search.ex](lib/ex_algo/search/binary_search.ex) | [Yes](test/ex_algo/search/binary_search_test.exs) | No | | |\n\n### Set\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Disjoint Set | [disjoint_set.ex](lib/ex_algo/set/disjoint_set.ex) | [Yes](test/ex_algo/set/disjoint_set_test.exs) | No | | |\n\n### Sort\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Bubble Sort | [exchange.ex](lib/ex_algo/sort/exchange.ex) | [Yes](test/ex_algo/sort/exchange_test.exs) | No | | |\n| Insertion Sort | [insertion.ex](lib/ex_algo/sort/insertion.ex) | [Yes](test/ex_algo/sort/insertion_test.exs) | No | | |\n| Merge Sort | [merge.ex](lib/ex_algo/sort/merge.ex) | [Yes](test/ex_algo/sort/merge_test.exs) | No | | |\n| Pigeonhole Sort | [distribution.ex](lib/ex_algo/sort/distribution.ex) | [Yes](test/ex_algo/sort/distribution_test.exs) | No | | |\n| Quick Sort | [exchange.ex](lib/ex_algo/sort/exchange.ex) | [Yes](test/ex_algo/sort/exchange_test.exs) | No | | |\n| Selection Sort | [selection.ex](lib/ex_algo/sort/selection.ex) | [Yes](test/ex_algo/sort/selection_test.exs) | No | | |\n\n### Stack\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Stack | [stack.ex](lib/ex_algo/stack/stack.ex) | [Yes](test/ex_algo/stack/stack_test.exs) | No | | |\n| Min-Max Stack | [min_max_stack.ex](lib/ex_algo/stack/min_max_stack.ex) | [Yes](test/ex_algo/stack/min_max_stack_test.exs) | No | | |\n\n### String\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n\n### Tree\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Binary Search Tree | [binary_search_tree.ex](lib/ex_algo/tree/binary_search_tree.ex) | [Yes](test/ex_algo/tree/binary_search_tree_test.exs) | No | |\n| Tree Traversals | [traversal.ex](lib/ex_algo/tree/traversal.ex) | [Yes](test/ex_algo/tree/traversal_test.exs) | No | | |\n\n### Counting\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Permutations | [combinatorics.ex::permutations](lib/ex_algo/counting/combinatorics.ex) | [Yes](test/ex_algo/counting/combinatorics_test.exs) | No | | Naive|\n| Combinations | [combinatorics.ex::combinations](lib/ex_algo/counting/combinatorics.ex) | [Yes](test/ex_algo/counting/combinatorics_test.exs) | No | | Naive|\n\n### Trie\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n\n\n### Dynamic Programming\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Subset Sum | [subset_sum.ex](lib/ex_algo/dynamic_programming/subset_sum.ex) | [Yes](test/ex_algo/dynamic_programming/subset_sum_test.exs) | No | | FIXME: Not all subsets are listed. Need to work on that. |\n\n### Numbers\n\n| Name | Implementation | Test | Benchmark | Link | Note |\n| :--: | :------------: | :--: | :-------: | :--: | :--: |\n| Chinese Remainder Theorem | [chinese_remainder.ex](lib/ex_algo/number/chinese_remainder.ex) | [Yes](test/ex_algo/number/chinese_remainder_test.exs) | No | | |\n| Catalan Numbers (Recursive) | [catalan.ex::recursive](lib/ex_algo/number/catalan.ex) | [Yes](test/ex_algo/number/catalan_test.exs) | No | | |\n| Catalan Numbers (Dynamic) | [catalan.ex::dp](lib/ex_algo/number/catalan.ex) | [Yes](test/ex_algo/number/catalan_test.exs) | No | | |\n| Divisors | [arithmetics.ex::divisors](lib/ex_algo/number/arithmetics.ex) | [Yes](test/ex_algo/number/arithmetics_test.exs) | No | | |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-shoily%2Fex_algo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-shoily%2Fex_algo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-shoily%2Fex_algo/lists"}