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

    Sep 14, 2024 · Maximum and minimum of an array using the Tournament Method: The idea is to divide the array into two parts and compare the maximums and minimums of the two parts to …

  2. Find Maximum and Minimum Element in an Array

    Given an array X [] of size n, write a program to find the maximum and minimum elements while making the minimum number of comparisons. This is an excellent question to learn problem …

  3. algorithm - What is the best way to get the minimum or maximum

    Jan 8, 2009 · There isn't any reliable way to get the minimum/maximum without testing every value. You don't want to try a sort or anything like that, walking through the array is O (n), …

  4. algorithm - How to find max. and min. in array using minimum ...

    Nov 25, 2012 · 1. Pick 2 elements(a, b), compare them. (say a > b) 2. Update min by comparing (min, b) 3. Update max by comparing (max, a) This way you would do 3 comparisons for 2 …

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

    Apr 10, 2025 · The approach involves using inbuilt functions to find the minimum and maximum elements in a collection, such as an array or a vector. These functions work by scanning …

  6. 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, …

  7. Max Min Problem in Data Structures - Online Tutorials Library

    Let us consider a simple problem that can be solved by divide and conquer technique. The Max-Min Problem in algorithm analysis is finding the maximum and minimum value in an array. To …

  8. Finding Minimum And Maximum (Application Of Divide And …

    Aug 13, 2022 · Finding a maximum and minimum element from a given array is the application of the Divide and Conquer algorithm. There are various ways to this problem, but the most …

  9. Find Maximum And Minimum Of An Array Using Minimum

    Dec 1, 2024 · Learn how to Find Maximum and minimum of an array with minimum comparisons using efficient algorithms like Divide and Conquer. Reduce time complexity effectively!

  10. Find the minimum and maximum element in an array using …

    Nov 15, 2021 · Given an integer array, find the minimum and maximum element present in it by making minimum comparisons by using the divide-and-conquer technique.

  11. Some results have been removed
Refresh