Question: In haskell Write a function mostOdds :: [[Int]] -> [Int]. It will takes a list of lists of integers, and will return that list of
![In haskell Write a function mostOdds :: [[Int]] -> [Int]. It](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f554335bf39_90666f55432c64cf.jpg)
In haskell
Write a function mostOdds :: [[Int]] -> [Int]. It will takes a list of lists of integers, and will return that list of integers that contains the most number of odd numbers. For example, in the below case, the second list, [11,15,10,17], contains 3 odd numbers, while the first list contains only one, and the third list contains only two. *Main> mostOdds [[1,10,20,30,40],[11,15,10,17] , [77,4,4,11]] [11,15,10,17] Your function must not use recursion. You should use at least one of map, filter, and foldi. You may also want to use length. You may write an additional helper function, if appropriate. If the input contains more than one list with the most number of odds, you may return any one of them. You may assume that the input list is nonempty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
