About 671,000 results
Open links in new tab
  1. Find the minimum and maximum element in an array using Divide and Conquer

    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. For example, Input: …

  2. Finding Minimum And Maximum (Application Of Divide And Conquer)

    Aug 13, 2022 · In Divide and Conquer approach: Step 1: Find the mid of the array. Step 2: Find the maximum and minimum of the left subarray recursively. Step 3: Find the maximum and …

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

    To find the maximum and minimum numbers in a given array numbers [] of size n, the following algorithm can be used. First we are representing the naive method and then we will present …

  4. c - To find minimum and maximum value from a given array using divide ...

    Jul 30, 2021 · Whatever you find with the first recursive call minmax (arr,low,mid); is overwritten by the second call minmax (arr,mid+1,high); You're also missing parens in your calculation of …

  5. C program to find maximum and minimum elements in array using recursion ...

    Apr 15, 2016 · Logic to find maximum and minimum array element using recursion. Recursion works on the concept of divide and conquer. We break the problem in its smallest size where it …

  6. Finding Maximum and Minimum Using Divide and Conquer

    Feb 27, 2025 · Divide: Split the array into two halves. Conquer: Recursively find the maximum and minimum in each half. Combine: Merge the results from the two halves to determine the …

  7. Max−Min(x,y) will return the maximum and minimum values of an array numbers[x...y] Algorithm: Max - Min(x, y) if x – y ≤ 1 then return (max(numbers[x], numbers[y]), min((numbers[x], …

  8. c++ - Divide and conquer algorithms to find the maximum

    The main idea is that if we divide the array in 2 subarrays, then the maximum must be in the left or in the right part of the array; there's no other possibility. So we find the maximum in the left …

  9. Min MaxDivide & Conquer. In this article, let’s discuss the

    Nov 19, 2022 · The divide & conquer approach divides the array into two halves. Using the recursive method, max and min are found for both halves.

  10. Recursive Programs to find Minimum and Maximum elements of

    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 : Input: arr = {1, 4, 3, -5, -4, 8, 6}; Output: min …

Refresh