That depends what exactly you mean by "constant sized". The time to find the minimum of a list with 917,340 elements is with a very large constant factor. The time to find the minimum of various lists of different constant sizes is and likely where is the size of each list. Finding the minimum of a list of 917,340 elements takes much longer than finding the minimum of a list of 3 elements.

Answer from gnasher729 on Stack Exchange
🌐
Pythoncomplexity
pythoncomplexity.com › builtins › min
Minimum - Python Big-O: Time & Space Complexity
# O(n*k) - evaluates key for each ... = min(lst) # ~1M comparisons # Same complexity with generators result = min(x**2 for x in range(10000)) # O(n) time, O(1) space ·...
🌐
Reddit
reddit.com › r/python › time complexity of min(set, function)
r/Python on Reddit: Time complexity of min(set, function)
March 11, 2017 -

I'm implementing an algorithm and I need a data structure with both very fast lookup of arbitrary elements like you get from a hash table and similar to a priority queue very fast lookup of the highest priority element ordered by a key associated with each item.

Is there anyway I can accomplish this? I thought of just using a set and something like min(set, lambda x: x.key), would this have to iterate through all elements?

🌐
LabEx
labex.io › tutorials › python-how-to-use-default-value-in-min-function-419879
How to use default value in min function | LabEx
The min() function has a time complexity of O(n) for iterables, making it efficient for most use cases in LabEx programming environments. ... By understanding these basics, you'll be well-prepared to use the min() function effectively in your ...
🌐
Medium
medium.com › @kapildevkhatik2 › how-about-python-optimization-mastering-time-and-space-complexity-for-improved-performance-e094101b42f8
Python Optimization: Mastering Time and Space Complexity for Improved Performance - Techniques for Enhanced Efficiency | Medium
June 18, 2023 - Here are some techniques for improving the time complexity of your Python code: Use built-in functions: Python provides many built-in functions that are optimized for efficiency. For example, instead of looping through a list to find the minimum value, you can use the min function.
Find elsewhere
🌐
Scribd
scribd.com › document › 730160411 › H-Standard-Algorithms
Min Time Complexity in Python Algorithms | PDF | Control Flow | Time Complexity
H - Standard Algorithms - Free download as PDF File (.pdf), Text File (.txt) or view presentation slides online.
🌐
Sean Coughlin
blog.seancoughlin.me › mastering-the-minstack-efficiently-supporting-minimum-element-retrieval-in-constant-time
Efficient MinStack: Constant Time Min Element Retrieval
June 28, 2024 - The MinStack problem requires creating a stack data structure that supports the following operations, all in constant O(1) time: ... MinStack() initializes the stack object. void push(int val) pushes the element val onto the stack. void pop() ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › complexity-cheat-sheet-for-python-operations
Complexity Cheat Sheet for Python Operations - GeeksforGeeks
July 12, 2025 - This cheat sheet is designed to ... complexities of common operations for these data structures that help them write optimized and efficient code in Python. Python's list is an ordered, mutable sequence, often implemented as a dynamic array. Below are the time complexities ...
🌐
AlgoCademy
algocademy.com › link
Minimum Value Of Three in Python | AlgoCademy
def find_minimum(A, B, C): # Initialize minVal with A minVal = A # Compare B with minVal if B < minVal: minVal = B # Compare C with minVal if C < minVal: minVal = C # Return the smallest value return minVal # Test cases print(find_minimum(7, 4, 9)) # Output: 4 print(find_minimum(3, 8, 3)) # Output: 3 · The time complexity of this approach is O(1) because we are performing a constant number of comparisons regardless of the input size.
🌐
Medium
medium.com › @ashutosh0626 › time-complexity-in-python-simply-explained-88b496f29a56
Time Complexity in Python Simply Explained | by Ashutosh Sharma | Medium
April 13, 2023 - Time Complexity in Python Simply Explained In Python programming, complexities refer to the amount of time and resources required to execute an algorithm or perform a certain operation. There are …
🌐
Codemia
codemia.io › knowledge-hub › path › big_o_of_min_and_max_in_python
Big O of min and max in Python
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises
🌐
LeetCode
leetcode.com › problems › interleaving-string › solutions › 1717669 › Python:-Space-complexity:-O(min(mn))-Time-Complexity:-O(mn)
Interleaving String - LeetCode
January 25, 2022 - Can you solve this real interview question? Interleaving String - Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2. An interleaving of two strings s and t is a configuration where s and t are divided into n and m substrings respectively, such that: * s ...
🌐
AlgoCademy
algocademy.com › link
Time Complexity Guidelines in Python | AlgoCademy
When approaching such problems, it is crucial to understand the time complexity requirements and constraints. Always consider the simplest and most direct way to achieve the desired outcome. Practice solving problems with different time complexity requirements to develop a deeper understanding of algorithm efficiency.
🌐
AfterAcademy
afteracademy.com › article › find-the-minimum-and-maximum-value
Find minimum and maximum value in an array - Interview Problem
October 6, 2019 - Problem Description: Given an array A[] of size n, you need to find the maximum and minimum element present in the array. Your algorithm should make the minimum number of comparisons. ... Problem Note:- The interviewer would not judge your algorithm for this question based on the time complexity as all solution has the time complexity of O(n).