Automated grading of homework assignments and tests
- fork this repository
- solve the task
- commit with proper message
Given the list of numbers, return the maximum number in the list.
Example 1:
Input: [1, 2, 3, 4, 5]
Output: 5Example 2:
Input: list1 = [12, 2, 5, 2, 7, 9, 1]
Output: 12Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, Find count of maximum numbers in the list.
Example 1:
Input: [1, 8, 3, 8, 5]
Output: 2Example 2:
Input: [13, 8, 3, 4, 9]
Output: 1Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, return the sum of the maximum and minimum numbers in the list.
Example 1:
Input: [1, 2, 3, 4, 5]
Output: 6Example 2:
Input: [2, 7, 3, 4, 9]
Output: 11Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, return the index of maximum number in the list
Example 1:
Input: [1, 2, 3, 4, 5]
Output: 4Example 2:
Input: [6, 8, 7, 4, 0]
Output: 1Given the list of numbers, Find the maximum even number in the list
Example 1:
Input: [1, 4, 3, 8, 5]
Output: 8Example 2:
Input: [7, 6, 3, 4, 9]
Output: 6Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, Find the maximum odd number in the list if there is no odd number return -1.
Example 1:
Input: [1, 8, 3, 8, 5]
Output: 5Example 2:
Input: [11, 7, 5, 4, 9]
Output: 11Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, return the minimum number in the list.
Example 1:
Input: [1, 2, -3, 4, 5]
Output: -3Example 2:
Input: list1 = [15, 23, 3, 9, 1, 4]
Output: 1Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, Find count of minimum numbers in the list.
Example 1:
Input: [1, 8, 3, 8, 5]
Output: 1Example 2:
Input: list1 = [0, -4, 3, 9, -2, -4]
Output: 2Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, return the index of minimum number in the list.
Example 1:
Input: [1, 2, -3, 4, 5]
Output: 2Example 2:
Input: list1 = [12, 2, 5, 2, 7, 9, 1]
Output: 6Given the list of numbers, Find the minimum even number in the list.
Example 1:
Input: [1, 8, 2, 8, 5]
Output: 2Example 2:
Input: list1 = [7, 8, 4, 3, 5]
Output: 4Constraints:
- 2 <= length(list1) <= 10^5
Given the list of numbers, Find the minimum odd number in the list.
Example 1:
Input: [1, 8, 2, 8, 5]
Output: 1Example 2:
Input: list1 = [7, 8, 4, 3, 5]
Output: 3Constraints:
- 2 <= length(list1) <= 10^5
- don't copy other solutions or any solution
- don't remove comments