1. okoks9011
  2. 99 problems in Ocaml

Wiki

Clone wiki

99 problems in Ocaml / 1_to_10

Problem 1

  • Find the last element of a list.

    Example in OCaml:
Not Yet

Problem 2

  • Find the last but one element of a list. Action of length under 1 list of it is undefined.

    Example in OCaml:
Not Yet

Problem 3

  • Find K'th element of a list. The first element in a list is number 1.

    Example in OCaml:
Not Yet

Problem 4

  • Find the number of elements of a list.

    Example in OCaml:
Not Yet

Problem 5

  • Revers a list.

    Example in OCaml:


Problem 6

  • Find out whether a list is a palindrome. A palindrome can be read forward or backward.

    Example in OCaml:


Problem 7

  • Flatten a nested list structure.

    Example in OCaml:

Updated