Question: Please help writing this code in OCaml functional programming language asap!!! split3 takes an input list (which we will assume is a list of integers)

Please help writing this code in OCaml functional programming language asap!!!
split3 takes an input list (which we will assume is a list of integers) and distributes it among three lists of equal size (or at least, as equal as is possible), which are returned. The original list elements in position 0,3,6 etc. (where the head of the list is considered to be position 0 ) must go into output list 1 , while those in position 1, 4, 7 etc. go in list 2 and those in 2,5,8 etc. into list 3. No other kind of list splitting is allowed. Your function should be able to split the lists in a single pass through the input list, and it must have a time complexity of O(n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
