Prompt:
(**You will be given the name of a class (a string) and a list of extensions.
 * The extensions are to be used to load additional classes to the class. The
 * strength of the extension is as follows: Let CAP be the number of the uppercase
 * letters in the extension's name, and let SM be the number of lowercase letters
 * in the extension's name, the strength is given by the fraction CAP - SM.
 * You should find the strongest extension and return a string in this
 * format: ClassName.StrongestExtensionName.
 * If there are two or more extensions with the same strength, you should
 * choose the one that comes first in the list.
 * For example, if you are given "Slices" as the class and a list of the
 * extensions: ['SErviNGSliCes', 'Cheese', 'StuFfed'] then you should
 * return 'Slices.SErviNGSliCes' since 'SErviNGSliCes' is the strongest extension
 * (its strength is -1).
 * Example:
 * >>> Strongest_Extension "my_class" ["AA"; "Be"; "CC"]
 * "my_class.AA"
*)
let Strongest_Extension (class_name : string) (extensions : string list) : string =

let assertions =
 let candidate = Strongest_Extension in
  (assert ((candidate "Watashi" ["tEN"; "niNE"; "eIGHt8OKe"]) = "Watashi.eIGHt8OKe"));
  (assert ((candidate "Boku123" ["nani"; "NazeDa"; "YEs.WeCaNe"; "32145tggg"]) = "Boku123.YEs.WeCaNe"));
  (assert ((candidate "__YESIMHERE" ["t"; "eMptY"; "nothing"; "zeR00"; "NuLl__"; "123NoooneB321"]) = "__YESIMHERE.NuLl__"));
  (assert ((candidate "K" ["Ta"; "TAR"; "t234An"; "cosSo"]) = "K.TAR"));
  (assert ((candidate "__HAHA" ["Tab"; "123"; "781345"; "-_-"]) = "__HAHA.123"));
  (assert ((candidate "YameRore" ["HhAas"; "okIWILL123"; "WorkOut"; "Fails"; "-_-"]) = "YameRore.okIWILL123"));
  (assert ((candidate "finNNalLLly" ["Die"; "NowW"; "Wow"; "WoW"]) = "finNNalLLly.WoW"));
  (assert ((candidate "_" ["Bb"; "91245"]) = "_.Bb"));
  (assert ((candidate "Sp" ["671235"; "Bb"]) = "Sp.671235"));
  ()


Prompt:
(**You are given 2 words. You need to return true if the second word or any of its rotations is a substring in the first word
 * >>> cycpattern_check "abcd" "abd"
 * false
 * >>> cycpattern_check "hello" "ell"
 * true
 * >>> cycpattern_check "whassup" "psus"
 * false
 * >>> cycpattern_check "abab" "baa"
 * true
 * >>> cycpattern_check "efef" "eeff"
 * false
 * >>> cycpattern_check "himenss" "simen"
 * true
*)
let cycpattern_check (a : string) (b : string) : bool =

let assertions =
 let candidate = cycpattern_check in
  (assert ((candidate "xyzw" "xyw") = false));
  (assert ((candidate "yello" "ell") = true));
  (assert ((candidate "whattup" "ptut") = false));
  (assert ((candidate "efef" "fee") = true));
  (assert ((candidate "abab" "aabb") = false));
  (assert ((candidate "winemtt" "tinem") = true));
  ()


Prompt:
(**Given an integer. return a tuple that has the number of even and odd digits respectively.
 * Example:
 * >>> even_odd_count (~12)
 * (1, 1)
 * >>> even_odd_count 123
 * (1, 2)
*)
let even_odd_count (num : int) :  int * int =

let assertions =
 let candidate = even_odd_count in
  (assert ((candidate 7) = (0, 1)));
  (assert ((candidate (~78)) = (1, 1)));
  (assert ((candidate 3452) = (2, 2)));
  (assert ((candidate 346211) = (3, 3)));
  (assert ((candidate (~345821)) = (3, 3)));
  (assert ((candidate (~2)) = (1, 0)));
  (assert ((candidate (~45347)) = (2, 3)));
  (assert ((candidate 0) = (1, 0)));
  ()


Prompt:
(**Given a positive integer, obtain its roman numeral equivalent as a string,
 * and return it in lowercase.
 * Restrictions: 1 <= num <= 1000
 * Examples:
 * >>> int_to_mini_roman 19
 * "xix"
 * >>> int_to_mini_roman 152
 * "clii"
 * >>> int_to_mini_roman 426
 * "cdxxvi"
*)
let int_to_mini_roman (number : int) : string =

let assertions =
 let candidate = int_to_mini_roman in
  (assert ((candidate 19) = "xix"));
  (assert ((candidate 152) = "clii"));
  (assert ((candidate 251) = "ccli"));
  (assert ((candidate 426) = "cdxxvi"));
  (assert ((candidate 500) = "d"));
  (assert ((candidate 1) = "i"));
  (assert ((candidate 4) = "iv"));
  (assert ((candidate 43) = "xliii"));
  (assert ((candidate 90) = "xc"));
  (assert ((candidate 94) = "xciv"));
  (assert ((candidate 532) = "dxxxii"));
  (assert ((candidate 900) = "cm"));
  (assert ((candidate 994) = "cmxciv"));
  (assert ((candidate 1000) = "m"));
  ()


Prompt:
(**Given the lengths of the three sides of a triangle. Return true if the three
 * sides form a right-angled triangle, false otherwise.
 * A right-angled triangle is a triangle in which one angle is right angle or
 * 90 degree.
 * Example:
 * >>> right_angle_triangle 3 4 5
 * true
 * >>> right_angle_triangle 1 2 3
 * false
*)
let right_angle_triangle (a : int) (b : int) (c : int) : bool =

let assertions =
 let candidate = right_angle_triangle in
  (assert ((candidate 3 4 5) = true));
  (assert ((candidate 1 2 3) = false));
  (assert ((candidate 10 6 8) = true));
  (assert ((candidate 2 2 2) = false));
  (assert ((candidate 7 24 25) = true));
  (assert ((candidate 10 5 7) = false));
  (assert ((candidate 5 12 13) = true));
  (assert ((candidate 15 8 17) = true));
  (assert ((candidate 48 55 73) = true));
  (assert ((candidate 1 1 1) = false));
  (assert ((candidate 2 2 10) = false));
  ()


Prompt:
(**Write a function that accepts a list of strings.
 * The list contains different words. Return the word with maximum number
 * of unique characters. If multiple strings have maximum number of unique
 * characters, return the one which comes first in lexicographical order.
 * >>> find_max ["name"; "of"; "string"]
 * "string"
 * >>> find_max ["name"; "enam"; "game"]
 * "enam"
 * >>> find_max ["aaaaaaa"; "bb"; "cc"]
 * "aaaaaaa"
*)
let find_max (words : string list) : string =

let assertions =
 let candidate = find_max in
  (assert ((candidate ["name"; "of"; "string"]) = "string"));
  (assert ((candidate ["name"; "enam"; "game"]) = "enam"));
  (assert ((candidate ["aaaaaaa"; "bb"; "cc"]) = "aaaaaaa"));
  (assert ((candidate ["abc"; "cba"]) = "abc"));
  (assert ((candidate ["play"; "this"; "game"; "of"; "footbott"]) = "footbott"));
  (assert ((candidate ["we"; "are"; "gonna"; "rock"]) = "gonna"));
  (assert ((candidate ["we"; "are"; "a"; "mad"; "nation"]) = "nation"));
  (assert ((candidate ["this"; "is"; "a"; "prrk"]) = "this"));
  (assert ((candidate ["b"]) = "b"));
  (assert ((candidate ["play"; "play"; "play"]) = "play"));
  ()


Prompt:
(**You're a hungry rabbit, and you already have eaten a certain number of carrots,
 * but now you need to eat more carrots to complete the day's meals.
 * you should return a list of [ total number of eaten carrots after your meals,
 * the number of carrots left after your meals ]
 * if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.
 * Example:
 * >>> eat 5 6 10
 * [11; 4]
 * >>> eat 4 8 9
 * [12; 1]
 * >>> eat 1 10 10
 * [11; 0]
 * >>> eat 2 11 5
 * [7; 0]
 * Variables:
 * @number : integer
 * the number of carrots that you have eaten.
 * @need : integer
 * the number of carrots that you need to eat.
 * @remaining : integer
 * the number of remaining carrots thet exist in stock
 * Constrain:
 * * 0 <= number <= 1000
 * * 0 <= need <= 1000
 * * 0 <= remaining <= 1000
 * Have fun :)
*)
let eat (number : int) (need : int) (remaining : int) : int list =

let assertions =
 let candidate = eat in
  (assert ((candidate 5 6 10) = [11; 4]));
  (assert ((candidate 4 8 9) = [12; 1]));
  (assert ((candidate 1 10 10) = [11; 0]));
  (assert ((candidate 2 11 5) = [7; 0]));
  (assert ((candidate 4 5 7) = [9; 2]));
  (assert ((candidate 4 5 1) = [5; 0]));
  ()


Prompt:
(**Given two lists operator, and operand. The first list has basic algebra operations, and
 * the second list is a list of integers. Use the two given lists to build the algebric
 * expression and return the evaluation of this expression.
 * The basic algebra operations:
 * Addition ( + )
 * Subtraction ( - )
 * Multiplication ( * )
 * Floor division ( // )
 * Exponentiation ( ** )
 * Example:
 * operator['+', '*', '-']
 * list = [2, 3, 4, 5]
 * result = 2 + 3 * 4 - 5
 * => result = 9
 * Note:
 * The length of operator list is equal to the length of operand list minus one.
 * Operand is a list of of non-negative integers.
 * Operator list has at least one operator, and operand list has at least two operands.
*)
let do_algebra (operator : string list) (operand : int list) : int =


Prompt:
(**You are given a string s.
 * if s[i] is a letter, reverse its case from lower to upper or vise versa,
 * otherwise keep it as it is.
 * If the string contains no letters, reverse the string.
 * The function should return the resulted string.
 * Examples
 * >>> solve "1234"
 * "4321"
 * >>> solve "ab"
 * "AB"
 * >>> solve "#a@C"
 * "#A@c"
*)
let solve (s : string) : string =

let assertions =
 let candidate = solve in
  (assert ((candidate "AsDf") = "aSdF"));
  (assert ((candidate "1234") = "4321"));
  (assert ((candidate "ab") = "AB"));
  (assert ((candidate "#a@C") = "#A@c"));
  (assert ((candidate "#AsdfW^45") = "#aSDFw^45"));
  (assert ((candidate "#6@2") = "2@6#"));
  (assert ((candidate "#$a^D") = "#$A^d"));
  (assert ((candidate "#ccc") = "#CCC"));
  ()


Prompt:
(**Given a string 'text', return its md5 hash equivalent string.
 * If 'text' is an empty string, return None.
 * >>> string_to_md5 "Hello world"
 * Some("3e25960a79dbc69b674cd4ec67a72c62")
*)
let string_to_md5 (text : string) : string option =

let assertions =
 let candidate = string_to_md5 in
  (assert ((candidate "Hello world") = Some("3e25960a79dbc69b674cd4ec67a72c62")));
  (assert ((candidate "") = Some(None)));
  (assert ((candidate "A B C") = Some("0ef78513b0cb8cef12743f5aeb35f888")));
  (assert ((candidate "password") = Some("5f4dcc3b5aa765d61d8327deb882cf99")));
  ()


Prompt:
(**Given two positive integers a and b, return the even digits between a
 * and b, in ascending order.
 * For example:
 * >>> generate_integers 2 8
 * [2; 4; 6; 8]
 * >>> generate_integers 8 2
 * [2; 4; 6; 8]
 * >>> generate_integers 10 14
 * []
*)
let generate_integers (a : int) (b : int) : int list =

let assertions =
 let candidate = generate_integers in
  (assert ((candidate 2 10) = [2; 4; 6; 8]));
  (assert ((candidate 10 2) = [2; 4; 6; 8]));
  (assert ((candidate 132 2) = [2; 4; 6; 8]));
  (assert ((candidate 17 89) = []));
  ()