Skip to content

informatica-unica/ocaml-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCaml exercises by difficulty level

It is suggested to work on exercises using a local installation of OCaml.

  • Read the instructions to install OCaml on your machine;
  • Read the instructions to keep your solutions to the exercises on a local repository synchronized with github.

Level 1

  1. Logical Nand
  2. Logical Xor
  3. Multiplexer
  4. Absolute value
  5. Max of two natural numbers
  6. Weekly lectures
  7. Blood donations
  8. Parrot trouble
  9. Increment optional value
  10. Squirrel play
  11. Exam committee
  12. Movie ratings
  13. Best offer
  14. Even and odd
  15. In range
  16. x to the 9th
  17. Highest card wins
  18. Head or tail
  19. Min and max of 3 values
  20. Guess a number
  21. 7, 11 and doubles

Level 2

  1. Function composition
  2. Flip arguments
  3. Both true
  4. Pipe operator
  5. Option map
  6. Optional application
  7. Alternative
  8. Conditional application
  9. Restrict domain
  10. Equality of boolean functions
  11. From type to function
  12. Characteristic functions
  13. Comparing fractions
  14. Consensus3
  15. Tris
  16. Poker
  17. Straight
  18. Loaded dice
  19. Morra

Level 3

  1. Sum range
  2. Has one
  3. Count zeros of a function
  4. Min and max of a function
  5. Reverse a list
  6. String of list
  7. Palindrome
  8. Perforated list
  9. Knife
  10. Student grades
  11. 1st, 3rd and 5th
  12. Random list
  13. Rotate list
  14. List comparison
  15. Consecutive even
  16. Key-value maps
  17. Bounce
  18. Enumeration of integers
  19. Enumeration of pairs of naturals
  20. Peano arithmetic
  21. Bit strings
  22. Euclid's GCD
  23. Sets
  24. Simple language recognizers
  25. Extract an element from a list
  26. Merge sort
  27. Deck of cards
  28. ALF students

Level 4

  1. Sets with list combinators
  2. Partial functions
  3. And then...
  4. DFAs
  5. Fibonacci sequence
  6. Alternating even numbers
  7. Binary search trees
  8. Binary arithmetic
  9. Grandfather and grandson

Level 5

  1. Deck of cards
  2. The return of the Pumping Lemma
  3. Longest subsequence
  4. List crush
  5. Ping pong

Additional resources