Skip to content

Python-2022-online/list_search

Repository files navigation

Welcome

list_search

Automated grading of homework assignments and tests

  • fork this repository
  • solve the task
  • commit with proper message

Problems

find01_max

Given the list of numbers, return the maximum number in the list.

Example 1:

Input: [1, 2, 3, 4, 5]
Output: 5

Example 2:

Input: list1 = [12, 2, 5, 2, 7, 9, 1]
Output: 12

Constraints:

  • 2 <= length(list1) <= 10^5

find02_max_count

Given the list of numbers, Find count of maximum numbers in the list.

Example 1:

Input: [1, 8, 3, 8, 5]
Output: 2

Example 2:

Input: [13, 8, 3, 4, 9]
Output: 1

Constraints:

  • 2 <= length(list1) <= 10^5

find03_max_min_sum

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: 6

Example 2:

Input: [2, 7, 3, 4, 9]
Output: 11

Constraints:

  • 2 <= length(list1) <= 10^5

find04_max_index

Given the list of numbers, return the index of maximum number in the list

Example 1:

Input: [1, 2, 3, 4, 5]
Output: 4

Example 2:

Input: [6, 8, 7, 4, 0]
Output: 1

find05_max_even

Given the list of numbers, Find the maximum even number in the list

Example 1:

Input: [1, 4, 3, 8, 5]
Output: 8

Example 2:

Input: [7, 6, 3, 4, 9]
Output: 6

Constraints:

  • 2 <= length(list1) <= 10^5

find06_max_odd

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: 5

Example 2:

Input: [11, 7, 5, 4, 9]
Output: 11

Constraints:

  • 2 <= length(list1) <= 10^5

find07_min

Given the list of numbers, return the minimum number in the list.

Example 1:

Input: [1, 2, -3, 4, 5]
Output: -3

Example 2:

Input: list1 = [15, 23, 3, 9, 1, 4]
Output: 1

Constraints:

  • 2 <= length(list1) <= 10^5

find08_min_count

Given the list of numbers, Find count of minimum numbers in the list.

Example 1:

Input: [1, 8, 3, 8, 5]
Output: 1

Example 2:

Input: list1 = [0, -4, 3, 9, -2, -4]
Output: 2

Constraints:

  • 2 <= length(list1) <= 10^5

find09_min_index

Given the list of numbers, return the index of minimum number in the list.

Example 1:

Input: [1, 2, -3, 4, 5]
Output: 2

Example 2:

Input: list1 = [12, 2, 5, 2, 7, 9, 1]
Output: 6

find10_min_even

Given the list of numbers, Find the minimum even number in the list.

Example 1:

Input: [1, 8, 2, 8, 5]
Output: 2

Example 2:

Input: list1 = [7, 8, 4, 3, 5]
Output: 4

Constraints:

  • 2 <= length(list1) <= 10^5

find11_min_odd

Given the list of numbers, Find the minimum odd number in the list.

Example 1:

Input: [1, 8, 2, 8, 5]
Output: 1

Example 2:

Input: list1 = [7, 8, 4, 3, 5]
Output: 3

Constraints:

  • 2 <= length(list1) <= 10^5

Warning

  • don't copy other solutions or any solution
  • don't remove comments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages