{"id":20324361,"url":"https://github.com/oniani/purity","last_synced_at":"2025-03-04T10:21:18.429Z","repository":{"id":112156598,"uuid":"153057362","full_name":"oniani/purity","owner":"oniani","description":"A collection of various algorithms and data structures","archived":false,"fork":false,"pushed_at":"2021-01-03T12:44:35.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T10:08:12.305Z","etag":null,"topics":["algorithms","data-structures","functional-programming","haskell"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/oniani.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-15T05:24:31.000Z","updated_at":"2021-09-22T05:35:24.000Z","dependencies_parsed_at":"2023-05-10T17:00:42.494Z","dependency_job_id":null,"html_url":"https://github.com/oniani/purity","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/oniani%2Fpurity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fpurity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fpurity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fpurity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oniani","download_url":"https://codeload.github.com/oniani/purity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241827451,"owners_count":20026688,"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","functional-programming","haskell"],"created_at":"2024-11-14T19:33:41.523Z","updated_at":"2025-03-04T10:21:18.399Z","avatar_url":"https://github.com/oniani.png","language":"Haskell","readme":"# Purity\n\nThis repository has the implementations of various algorithms and data\nstructures. Everything is implemented in [Haskell](https://www.haskell.org/).\nMost, if not all, algorithms and data structures use recursion in some way. The\nprimary goal of the repository is to have a collection of high-performance and,\npreferably, minimal implementations of algorithms and data structures.\n\n## Why Haskell?\n\nHaskell's type system allows for very expressive code. Functions are\nfirst-class citizens (think of variables) which opens up a whole new world of\nalgorithms and data structures. Furthermore, so-called divide-and-conquer\napproach to problem-solving (breaking down a problem into simple steps and\ndealing with the smaller subproblems making the problem-solving a lot more\nefficient) comes naturally with Haskell and is endorsed by the philosophy and\ndesign of the language. Besides, its lazy evaluation by default can make\nalgorithms run extremely fast by not computing the values which are not going\nto be used.\n\n## Current implementations\n\n### Data Structures\n\n_Basic data structures_\n\n- [Binary search tree](https://github.com/oniani/purity/blob/master/src/data-structures/basic-structures/BinarySearchTree.hs)\n- [Binary tree](https://github.com/oniani/purity/blob/master/src/data-structures/basic-structures/BinaryTree.hs)\n- [Fraction](https://github.com/oniani/purity/blob/master/src/data-structures/basic-structures/Fraction.hs)\n- [Linked List](https://github.com/oniani/purity/blob/master/src/data-structures/basic-structures/LinkedList.hs)\n- [Queue](https://github.com/oniani/purity/blob/master/src/data-structures/basic-structures/Queue.hs)\n- [Stack](https://github.com/oniani/purity/blob/master/src/data-structures/basic-structures/Stack.hs)\n\n_Geometric data structures_\n\n- [Line](https://github.com/oniani/purity/blob/master/src/data-structures/geometric-structures/Line.hs)\n- [Triangle](https://github.com/oniani/purity/blob/master/src/data-structures/geometric-structures/Triangle.hs)\n\n### Algorithms\n\n_Searching algorithms_\n\n- [Binary search](https://github.com/oniani/purity/blob/master/src/algorithms/searching/BinarySearch.hs)\n- [Exponential search](https://github.com/oniani/purity/blob/master/src/algorithms/searching/ExponentialSearch.hs)\n- [Interpolation search](https://github.com/oniani/purity/blob/master/src/algorithms/searching/InterpolationSearch.hs)\n- [Linear search](https://github.com/oniani/purity/blob/master/src/algorithms/searching/LinearSearch.hs)\n\n_Sorting algorithms_\n\n- [Bogosort (DO NOT RUN ON YOUR MACHINE! If interested, just look at the implementation)](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/Bogosort.hs)\n- [Bubble sort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/BubbleSort.hs)\n- [Counting sort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/CountingSort.hs)\n- [Insertion sort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/InsertionSort.hs)\n- [Merge sort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/MergeSort.hs)\n- [Quicksort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/Quicksort.hs)\n- [Selection Sort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/SelectionSort.hs)\n- [Shellsort](https://github.com/oniani/purity/blob/master/src/algorithms/sorting/Shellsort.hs)\n\n_Sequence generation algorithms_\n\n- [Arithmetic Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/ArithmeticGenerator.hs)\n- [Calkin-Wilf Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/CalkinWilfGenerator.hs)\n- [Catalan Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/CatalanGenerator.hs)\n- [Collatz Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/CollatzGenerator.hs)\n- [Stern's Diatomic Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/DiatomicGenerator.hs)\n- [Fibonacci Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/FibonacciGenerator.hs)\n- [Geometric Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/GeometricGenerator.hs)\n- [Lazy Caterer's Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/LazyCatererGenerator.hs)\n- [Magic Square Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/MagicSquareGenerator.hs)\n- [Prime Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/PrimeGenerator.hs)\n- [Recamán's Sequence Generator](https://github.com/oniani/purity/blob/master/src/algorithms/sequence-generation/RecamanGenerator.hs)\n\n_Miscellaneous algorithms_\n\n- [Base Converter](https://github.com/oniani/purity/blob/master/src/algorithms/miscellaneous/BaseConverter.hs)\n\n## License\n\n[MIT License](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foniani%2Fpurity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foniani%2Fpurity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foniani%2Fpurity/lists"}