Please use python with executed tests
1. Counting Biggest Value. A list can contain values of any type, even lists. For example, consider ex = [[2, 4], [5], [3, 5, 5, 2], [5, 1]]. Here ex is a list. Each item in ex is a List[int]. So ex is a List[List[int]]. Write a function count_biggest (lol). It takes a List[List[int]], and returns an int indicating how many times the largest number in 101 appears. For example, in ex, the largest value is 5, and it appears 4 times, so count_biggest (ex) ⇒ 4. You may assume that 101 contains at least one list, and that each list in 101 is not empty. Include these in your requirements. (For extra challenge, try to write your solution so it only requires that at least one list in 101 is not empty. For example, count_biggest([[], [], [-3, -2], [-2, -2]]) → 3, because -2 is the largest value, and it appears 3 times.) Exercise
Please use python with executed tests
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am