{"id":16646492,"url":"https://github.com/asarkar/99-haskell","last_synced_at":"2025-10-30T07:03:54.312Z","repository":{"id":213727408,"uuid":"734397263","full_name":"asarkar/99-haskell","owner":"asarkar","description":"H-99: Ninety-Nine Haskell Problems","archived":false,"fork":false,"pushed_at":"2025-05-19T08:45:03.000Z","size":155,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-15T16:11:41.246Z","etag":null,"topics":["99-haskell-problems","99-problems","99problems","functional-programming","haskell","ninety-nine-haskell-problems","ninety-nine-problems"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asarkar.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,"zenodo":null},"funding":{"github":"asarkar"}},"created_at":"2023-12-21T15:21:12.000Z","updated_at":"2025-05-19T08:45:07.000Z","dependencies_parsed_at":"2023-12-22T17:24:33.686Z","dependency_job_id":"978cf9fa-8a68-40ac-ba98-7f84ad65519b","html_url":"https://github.com/asarkar/99-haskell","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"6d45393c6d3f370bda8ee7b42bbcc38aafae8fa8"},"previous_names":["asarkar/99-haskell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asarkar/99-haskell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asarkar%2F99-haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asarkar%2F99-haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asarkar%2F99-haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asarkar%2F99-haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asarkar","download_url":"https://codeload.github.com/asarkar/99-haskell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asarkar%2F99-haskell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264343792,"owners_count":23593792,"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":["99-haskell-problems","99-problems","99problems","functional-programming","haskell","ninety-nine-haskell-problems","ninety-nine-problems"],"created_at":"2024-10-12T08:27:51.746Z","updated_at":"2025-10-30T07:03:54.197Z","avatar_url":"https://github.com/asarkar.png","language":"Haskell","readme":"[H-99: Ninety-Nine Haskell Problems](https://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems)\n\n[![](https://github.com/asarkar/99-haskell/workflows/CI/badge.svg)](https://github.com/asarkar/99-haskell/actions)\n\nA number of problems were added to fill out 99 problems.\n- These are the problems 29, 30, 42, 43, 44, 45, 51, 52, 53, 74, 75, 76, 77, 78, and 79.\n\n## Lists\n\n[P01](src/List/P01.hs) (*) Find the last element of a list.\n\n[P02](src/List/P02.hs) (*) Find the last but one element of a list.\n\n[P03](src/List/P03.hs) (*) Find the Kth element of a list.\n\n[P04](src/List/P04.hs) (*) Find the number of elements of a list.\n\n[P05](src/List/P05.hs) (*) Reverse a list.\n\n[P06](src/List/P06.hs) (*) Find out whether a list is a palindrome.\n\n[P07](src/List/P07.hs) (**) Flatten a nested list structure.\n\n[P08](src/List/P08.hs) (**) Eliminate consecutive duplicates of list elements.\n\n[P09](src/List/P09.hs) (**) Pack consecutive duplicates of list elements into sublists.\n\n[P10](src/List/P10.hs) (*) Run-length encoding of a list.\n\n[P11](src/List/P11.hs) (*) Modified run-length encoding.\n\n[P12](src/List/P12.hs) (**) Decode a run-length encoded list.\n\n[P13](src/List/P13.hs) (**) Run-length encoding of a list (direct solution).\n\n[P14](src/List/P14.hs) (*) Duplicate the elements of a list.\n\n[P15](src/List/P15.hs) (**) Duplicate the elements of a list a given number of times.\n\n[P16](src/List/P16.hs) (**) Drop every Nth element from a list.\n\n[P17](src/List/P17.hs) (*) Split a list into two parts.\n\n[P18](src/List/P18.hs) (**) Extract a slice from a list.\n\n[P19](src/List/P19.hs) (**) Rotate a list N places to the left.\n\n[P20](src/List/P20.hs) (*) Remove the Kth element from a list.\n\n[P21](src/List/P21.hs) (*) Insert an element at a given position into a list.\n\n[P22](src/List/P22.hs) (*) Create a list containing all integers within a given range.\n\n[P23](src/List/P23.hs) (**) Extract a given number of randomly selected elements from a list.\n\n[P24](src/List/P24.hs) (*) Lotto: Draw N different random numbers from the set 1..M.\n\n[P25](src/List/P25.hs) (*) Generate a random permutation of the elements of a list.\n\n[P26](src/List/P26.hs) (**) Generate the combinations of K distinct objects chosen from the N elements of a list.\n\n[P27](src/List/P27.hs) (**) Group the elements of a set into disjoint subsets.\n\n[P28](src/List/P28.hs) (**) Sorting a list of lists according to length of sublists.\n\n[P29](src/List/P28.hs) (*) Write a function to compute the nth Fibonacci number.\n\n[P30](src/List/P30.hs) (**) Write a function to compute the nth Fibonacci number.\n\n## Arithmetic\n\n[P31](src/Arithmetic/P31.hs) (**) Determine whether a given integer number is prime.\n\n[P32](src/Arithmetic/P32.hs) (**) Determine the greatest common divisor of two positive integer numbers.\n\n[P33](src/Arithmetic/P33.hs) (*) Determine whether two positive integer numbers are coprime.\n\n[P34](src/Arithmetic/P34.hs) (**) Calculate Euler’s totient function ϕ(m).\n\n[P35](src/Arithmetic/P35.hs) (**) Determine the prime factors of a given positive integer.\n\n[P36](src/Arithmetic/P36.hs) (**) Determine the prime factors of a given positive integer (2).\n\n[P37](src/Arithmetic/P37.hs) (**) Calculate Euler’s totient function ϕ(m) (improved).\n\n[P38](src/Arithmetic/P38.hs) (*) Compare the two methods of calculating Euler’s totient function.\n\n[P39](src/Arithmetic/P39.hs) (*) A list of prime numbers.\n\n[P40](src/Arithmetic/P40.hs) (**) Goldbach's conjecture.\n\n[P41](src/Arithmetic/P41.hs) (**) A list of Goldbach compositions.\n\n[P42](src/Arithmetic/P42.hs) (**) Modular multiplicative inverse.\n\n[P43](src/Arithmetic/P43.hs) (*) Gaussian integer divisibility.\n\n[P44](src/Arithmetic/P44.hs) (**) Gaussian primes.\n\n[P45](src/Arithmetic/P45.hs) (*) Gaussian primes using the two-square theorem.\n\n## Logic and Codes\n\n[P46](src/Logic/P46.hs) (**) Truth tables for logical expressions.\n\n[P47](src/Logic/P47.hs) (*) Truth tables for logical expressions (2).\n\n[P48](src/Logic/P48.hs) (**) Truth tables for logical expressions (3).\n\n[P49](src/Logic/P49.hs) (**) Gray code.\n\n[P50](src/Logic/P50.hs) (***) Huffman code.\n\n[P51](src/Logic/P51.hs) (*) Error correction codes.\n\n[P52](src/Logic/P52.hs) (***) Conjunctive normal form.\n\n[P53](src/Logic/P53.hs) (***) Resolution rule.\n\n## Binary Trees\n\nP54A omitted; our tree representation will only allow well-formed trees.\n\n[P55](src/BinaryTree/P55.hs) (**) Construct completely balanced binary trees.\n\n[P56](src/BinaryTree/P56.hs) (**) Symmetric binary trees.\n\n[P57](src/BinaryTree/P57.hs) (**) Binary search trees (dictionaries).\n\n[P58](src/BinaryTree/P58.hs) (**) Generate-and-test paradigm.\n\n[P59](src/BinaryTree/P59.hs) (**) Construct height-balanced binary trees.\n\n[P60](src/BinaryTree/P60.hs) (**) Construct height-balanced binary trees with a given number of nodes.\n\n[P61](src/BinaryTree/P61.hs) (*) Count the leaves of a binary tree.\n\n[P61A](src/BinaryTree/P61A.hs) (*) Collect the leaves of a binary tree in a list.\n\n[P62](src/BinaryTree/P62.hs) (*) Collect the internal nodes of a binary tree in a list.\n\n[P62B](src/BinaryTree/P62B.hs) (*) Collect the nodes at a given level in a list.\n\n[P63](src/BinaryTree/P63.hs) (**) Construct a complete binary tree.\n\n[P64](src/BinaryTree/P64.hs) (**) Layout a binary tree (1).\n\n[P65](src/BinaryTree/P65.hs) (**) Layout a binary tree (2).\n\n[P66](src/BinaryTree/P66.hs) (***) Layout a binary tree (3).\n\n[P67A](src/BinaryTree/P67A.hs) (**) A string representation of binary trees.\n\n[P68](src/BinaryTree/P68.hs) (**) Preorder and inorder sequences of binary trees.\n\n[P69](src/BinaryTree/P69.hs) (**) Dotstring representation of binary trees.\n\n## Multiway Trees\n\nP70B omitted; we can only create well-formed trees.\n\n[P70C](src/MultiwayTree/P70C.hs) (*) Count the nodes of a multiway tree.\n\n[P70](src/MultiwayTree/P70.hs) (**) Tree construction from a node string.\n\n[P71](src/MultiwayTree/P71.hs) (*) Determine the internal path length of a tree.\n\n[P72](src/MultiwayTree/P72.hs) (*) Construct the postorder sequence of the tree nodes.\n\n[P73](src/MultiwayTree/P73.hs) (**) Lisp-like tree representation.\n\n\n## Monads\n\n[P74](src/Monad/P74.hs) (**) Monads without do notation.\n\n[P75](src/Monad/P75.hs) (*) Maybe monad.\n\n[P76](src/Monad/P76.hs) (*) Either monad.\n\n[P77](src/Monad/P77.hs) (*) List monad.\n\n[P78](src/Monad/P78.hs) (*) Collatz conjecture.\n\n[P79](src/Monad/P79.hs) (**) Postfix notation.\n\n## Graphs\n\n[P80](src/Graph/P80.hs) (***) Conversions.\n\n[P81](src/Graph/P81.hs) (**) Path from one node to another one.\n\n[P82](src/Graph/P82.hs) (*) Cycle from a given node.\n\n[P83](src/Graph/P83.hs) (**) Construct all spanning trees.\n\n[P84](src/Graph/P84.hs) (**) Construct the minimal spanning tree.\n\n[P85](src/Graph/P85.hs) (**) Graph isomorphism.\n\n[P86](src/Graph/P86.hs) (**) Node degree and graph coloration.\n\n[P87](src/Graph/P87.hs) (**) Depth-first order graph traversal.\n\n[P88](src/Graph/P88.hs) (**) Connected components.\n\n[P89](src/Graph/P89.hs) (**) Bipartite graphs.\n\n## Miscellaneous Problems\n\n[P90](src/Misc/P90.hs) (**) Eight queens problem.\n\n[P91](src/Misc/P91.hs) (**) Knight’s tour.\n\n[P92](src/Misc/P92.hs) (***) Von Koch’s conjecture.\n\n[P93](src/Misc/P93.hs) (***) An arithmetic puzzle.\n\n[P94](src/Misc/P94.hs) (***) Generate K-regular simple graphs with N nodes.\n\n[P95](src/Misc/P95.hs) (**) English number words.\n\n[P96](src/Misc/P96.hs) (**) Syntax checker.\n\n[P97](src/Misc/P97.hs) (**) Sudoku.\n\n[P98](src/Misc/P98.hs) (***) Nonograms.\n\n[P99](src/Misc/P99.hs) (***) Crossword puzzle.\n\n## Running tests\n\n```\n./.github/run.sh\n```\n\nTo run all matching tests:\n```\n./.github/run.sh -m \u003csome_word\u003e\n```\n\nTo run exactly matching tests:\n```\n./.github/run.sh -m \"/\u003csome_word\u003e/\"\n```\n\nTo run a _specific test_:\n```\n./.github/run.sh -m \"/Ch11/evaluates expression/eval/\"\n```\n\nTo run a file containing a `main` method:\n```\nstack runhaskell app/Main.hs\n```\n\nTo run an executable listed in `package.yaml`:\n```\nstack build\nstack exec \u003cname\u003e\n```\n\n## License\n\nReleased under [Apache License v2.0](LICENSE).\n","funding_links":["https://github.com/sponsors/asarkar"],"categories":["Languages"],"sub_categories":["Haskell"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasarkar%2F99-haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasarkar%2F99-haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasarkar%2F99-haskell/lists"}