About 818,000 results
Open links in new tab
  1. Maximum and minimum of an array using minimum number of comparisons

    Sep 14, 2024 · Step 1: Write functions to find the minimum (setmini) and maximum (setmaxi) values in the array. Step 2: In the setmini function: Initialize a variable (mini) to INT_MAX. …

  2. Python's min() and max(): Find Smallest and Largest Values

    Jan 18, 2025 · In this tutorial, you'll learn how to use Python's built-in min() and max() functions to find the smallest and largest values. You'll also learn how to modify their standard behavior by …

  3. Recursive Programs to find Minimum and Maximum elements of array

    Sep 19, 2023 · Given an array of integers arr, the task is to find the minimum and maximum element of that array using recursion. Examples : Output: min = -5, max = 8. Input: arr = {1, 4, …

  4. Program to find the minimum (or maximum) element of an array

    Apr 10, 2025 · Given an array, write functions to find the minimum and maximum elements in it. Examples: Input: arr[] = [1, 423, 6, 46, 34, 23, 13, 53, 4] Output: Minimum element of array: 1 …

  5. Python – Find the Kth Maximum and Minimum Elements in an Array

    Given an unsorted array arr and an integer k, find the kth smallest (minimum) and kth largest (maximum) elements in the array. There are several ways to approach this problem: Using …

  6. Algorithm to find minimum AND maximum of an unsorted array

    Aug 23, 2021 · Given an unsorted array, how can we efficiently find the minimum and maximum items inside? Many examples exist finding either max or mininum but I'm interested in finding …

  7. Python - Find the Maximum and Minimum Elements in an Array

    There are multiple ways to find the maximum and minimum elements in an array. Below are three common approaches: Using Python’s Built-in Functions: The max() and min() functions return …

  8. algorithm - Can I find the max/min value in an unsorted Array in …

    Dec 4, 2011 · For unsorted array min/max complexity is O(N). No way to outperform it. For sorted arrays 0(1) but sort is 0{N log N). and if you need to search for min/max only ones or near it …

  9. Python Program to Find Minimum and Maximum Value in an Array

    Write a Python Program to Find the Minimum and Maximum Value in an Array. The numpy module has min and max functions to return the minimum and maximum values in a numpy …

  10. python - Finding the minimum and maximum of a list of arrays

    Jul 10, 2015 · You can just use min() or max() on single list to get it's min/max value. You can also use list comprehension to loop through lists in list and functions you want to use: main_array = …

  11. Some results have been removed
Refresh