#java

Veröffentlicht am: 14 Oktober 2024
auf dem Kanal: softcoder
10
3

#day 5/100 #get min and max in array in java #java #dsa #100daysofcode #day5 #programming #java program to find min and max array
Maximum and minimum of an array using minimum number of comparisons

Given an array of size N. The task is to find the maximum and the minimum element of the array using the minimum number of comparisons.

Examples:

Input: arr[] = {3, 5, 4, 1, 9}
Output: Minimum element is: 1
Maximum element is: 9


Input: arr[] = {22, 14, 8, 17, 35, 3}
Output: Minimum element is: 3
Maximum element is: 35


Auf dieser Seite können Sie das Online-Video #java mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer softcoder 14 Oktober 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 10 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!