Solving with Imperative and functional styles both — Problem Statement We have been given a bag of fruits. We need to find all the fruits that are more than the given threshold. For example, the list of the below fruits contains 3 types of fruits and each with a different occurrence, apple →6, grapes →2, kiwi →5, so the answer…