easy +10 pts

Find Minimum Value

Return the smallest number from a list of integers.

Implement the function `find_minimum(numbers)` that takes a list of integers `numbers` and returns the smallest value in the list. The list will contain at least one integer. You may not use the built-in `min()` function — implement the logic yourself using a loop and comparisons. The order of the list should not matter.

Constraints

The input list will contain at least one integer. The integers can be negative, zero, or positive. The function should run in O(n) time and O(1) extra space.

Example

>>> find_minimum([3, 1, 2])
1
>>> find_minimum([-5, -2, -10])
-10
>>> find_minimum([42])
42
10 points ~10 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Start by assuming the first element is the minimum.
Loop through the list and update your minimum when you find a smaller value.
Remember that negative numbers are smaller than positive numbers.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.