{"id":17121447,"url":"https://github.com/hellojukay/ocaml-99problems","last_synced_at":"2025-03-24T02:28:25.246Z","repository":{"id":140615578,"uuid":"388361543","full_name":"hellojukay/ocaml-99problems","owner":"hellojukay","description":"The answer of https://ocaml.org/learn/tutorials/99problems.html","archived":false,"fork":false,"pushed_at":"2021-08-02T08:16:55.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T08:34:29.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellojukay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-07-22T07:01:53.000Z","updated_at":"2022-02-22T01:29:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ad4c34c-8f5b-4317-8208-98ea3565d957","html_url":"https://github.com/hellojukay/ocaml-99problems","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":0.1923076923076923,"last_synced_commit":"f85f059d431653e136c6b5f81eb86574056613f7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojukay%2Focaml-99problems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojukay%2Focaml-99problems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojukay%2Focaml-99problems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojukay%2Focaml-99problems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellojukay","download_url":"https://codeload.github.com/hellojukay/ocaml-99problems/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245197805,"owners_count":20576265,"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":[],"created_at":"2024-10-14T18:02:31.298Z","updated_at":"2025-03-24T02:28:25.220Z","avatar_url":"https://github.com/hellojukay.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ocaml-99problems\nThe answer of https://ocaml.org/learn/tutorials/99problems.html\n\n     \n- [x] 1. Write a function last : 'a list -\u003e 'a option that returns the last element of a list. (easy)  [[finished]](main.ml#L1) \n- [x] 2. Find the last but one (last and penultimate) elements of a list. (easy)  [[finished]](main.ml#L5) \n- [x] 3. Find the K'th element of a list. (easy)  [[finished]](main.ml#L13) \n- [x] 4. Find the number of elements of a list. (easy)  [[finished]](main.ml#L25) \n- [x] 5. Reverse a list. (easy)  [[finished]](main.ml#L28) \n- [x] 6. Find out whether a list is a palindrome. (easy)  [[finished]](main.ml#L32) \n- [x] 7. Flatten a nested list structure. (medium)  [[finished]](main.ml#L48) \n- [x] 8. Eliminate consecutive duplicates of list elements. (medium)  [[finished]](main.ml#L65) \n- [x] 9. Pack consecutive duplicates of list elements into sublists. (medium)  [[finished]](main.ml#L80) \n- [x] 10. Run-length encoding of a list. (easy)  [[finished]](main.ml#L100) \n- [x] 11. Modified run-length encoding. (easy)  [[finished]](main.ml#L119) \n- [x] 12. Decode a run-length encoded list. (medium)  [[finished]](main.ml#L140) \n- [x] 13. Run-length encoding of a list (direct solution). (medium)  [[finished]](main.ml#L156) \n- [x] 14. Duplicate the elements of a list. (easy)  [[finished]](main.ml#L168) \n- [x] 15. Replicate the elements of a list a given number of times. (medium)  [[finished]](main.ml#L172) \n- [x] 16. Drop every N'th element from a list. (medium)  [[finished]](main.ml#L184) \n- [x] 17. Split a list into two parts; the length of the first part is given. (easy)  [[finished]](main.ml#L197) \n- [x] 18. Extract a slice from a list. (medium)  [[finished]](main.ml#L208) \n- [x] 19. Rotate a list N places to the left. (medium)  [[finished]](main.ml#L216) \n- [x] 20. Remove the K'th element from a list. (easy)  [[finished]](main.ml#L229) \n- [x] 21. Insert an element at a given position into a list. (easy)  [[finished]](main.ml#L235) \n- [x] 22. Create a list containing all integers within a given range. (easy)  [[finished]](main.ml#L243) \n- [ ] 23. Extract a given number of randomly selected elements from a list. (medium) \n- [ ] 24. Lotto: Draw N different random numbers from the set 1..M. (easy) \n- [x] 25. Generate a random permutation of the elements of a list. (easy)  [[finished]](main.ml#L251) \n- [ ] 26. Generate the combinations of K distinct objects chosen from the N elements of a list. (medium) \n- [ ] 27. Group the elements of a set into disjoint subsets. (medium) \n- [ ] 28. Sorting a list of lists according to length of sublists. (medium) \n- [ ] 31. Determine whether a given integer number is prime. (medium) \n- [ ] 32. Determine the greatest common divisor of two positive integer numbers. (medium) \n- [ ] 33. Determine whether two positive integer numbers are coprime. (easy) \n- [ ] 34. Calculate Euler's totient function φ(m). (medium) \n- [ ] 35. Determine the prime factors of a given positive integer. (medium) \n- [ ] 36. Determine the prime factors of a given positive integer (2). (medium) \n- [ ] 37. Calculate Euler's totient function φ(m) (improved). (medium) \n- [ ] 38. Compare the two methods of calculating Euler's totient function. (easy) \n- [x] 39. A list of prime numbers. (easy)  [[finished]](main.ml#L277) \n- [ ] 40. Goldbach's conjecture. (medium) \n- [ ] 41. A list of Goldbach compositions. (medium) \n- [ ] 46 \u0026 47. Truth tables for logical expressions (2 variables). (medium) \n- [ ] 48. Truth tables for logical expressions. (medium) \n- [ ] 49. Gray code. (medium) \n- [ ] 50. Huffman code (hard) \n- [ ] 55. Construct completely balanced binary trees. (medium) \n- [ ] 56. Symmetric binary trees. (medium) \n- [ ] 57. Binary search trees (dictionaries). (medium) \n- [ ] 58. Generate-and-test paradigm. (medium) \n- [ ] 59. Construct height-balanced binary trees. (medium) \n- [ ] 60. Construct height-balanced binary trees with a given number of nodes. (medium) \n- [ ] 61. Count the leaves of a binary tree. (easy) \n- [ ] 61A. Collect the leaves of a binary tree in a list. (easy) \n- [ ] 62. Collect the internal nodes of a binary tree in a list. (easy) \n- [ ] 62B. Collect the nodes at a given level in a list. (easy) \n- [ ] 63. Construct a complete binary tree. (medium) \n- [ ] 64. Layout a binary tree (1). (medium) \n- [ ] 65. Layout a binary tree (2). (medium) \n- [ ] 66. Layout a binary tree (3). (hard) \n- [ ] 67. A string representation of binary trees. (medium) \n- [ ] 68. Preorder and inorder sequences of binary trees. (medium) \n- [ ] 69. Dotstring representation of binary trees. (medium) \n- [ ] 70C. Count the nodes of a multiway tree. (easy) \n- [ ] 70. Tree construction from a node string. (medium) \n- [ ] 71. Determine the internal path length of a tree. (easy) \n- [ ] 72. Construct the bottom-up order sequence of the tree nodes. (easy) \n- [ ] 73. Lisp-like tree representation. (medium) \n- [ ] 80. Conversions. (easy) \n- [ ] 81. Path from one node to another one. (medium) \n- [ ] 82. Cycle from a given node. (easy) \n- [ ] 83. Construct all spanning trees. (medium) \n- [ ] 84. Construct the minimal spanning tree. (medium) \n- [ ] 85. Graph isomorphism. (medium) \n- [ ] 86. Node degree and graph coloration. (medium) \n- [ ] 87. Depth-first order graph traversal. (medium) \n- [ ] 88. Connected components. (medium) \n- [ ] 89. Bipartite graphs. (medium) \n- [ ] 90. Generate K-regular simple graphs with N nodes. (hard) \n- [ ] 91. Eight queens problem. (medium) \n- [ ] 92. Knight's tour. (medium) \n- [ ] 93. Von Koch's conjecture. (hard) \n- [ ] 94. An arithmetic puzzle. (hard) \n- [ ] 95. English number words. (medium) \n- [ ] 96. Syntax checker. (medium) \n- [ ] 97. Sudoku. (medium) \n- [ ] 98. Nonograms. (hard) \n- [ ] 99. Crossword puzzle. (hard) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellojukay%2Focaml-99problems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellojukay%2Focaml-99problems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellojukay%2Focaml-99problems/lists"}