ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Algorithm to find Maximum and Minimum number in an Array || Lesson 17 || Data Structures ||

Автор: Wisdomers - Computer Science and Engineering

Загружено: 2022-10-10

Просмотров: 14923

Описание: In this class, we will try to understand the algorithm to find Maximum and Minimum number in an Array.

We have already discussed the concepts of sorting and searching algorithms in our previous classes.
Algorithm to find Maximum and Minimum number in an Array

We will consider the following array of elements to understand the above algorithm clearly.

In the above array, with our intuition, we can say that the maximum element is nine and the minimum element is 1.

Before understanding the algorithm, we will understand the working mechanism to find an array’s maximum and minimum elements.

First, we will consider the element in the zeroth index as the maximum and minimum element.

In our case, the maximum and minimum element is 3.

With that assumption, we will proceed.

We will start with the element in the first index and compare it with the existing maximum and minimum elements.

We will compare seven with three existing maximum and minimum elements in our case.

Seven is greater than three, so the new maximum element is seven.

Similarly, seven is NOT smaller than three, so three will be our minimum element.

In the same way, we will compare all the elements in the array until the end.

In the end, we will get the maximum and minimum elements in the array.

The image is an algorithm to find maximum and minimum number in an array.

To find the maximum and minimum element, the loop in the algorithm will iterate from the first index till the end of the array.

In every iteration, we will compare each array element with the existing maximum and minimum elements.

By the end of all iterations, we will get the maximum and minimum elements of the array.

#datastrctures #gatecse #learningmonkey #placementtraining #gatedatastructures


Link for playlists:
   / @wisdomerscse  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ [email protected]

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Algorithm to find Maximum and Minimum number in an Array || Lesson 17 || Data Structures ||

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Working Mechanism for Finding the Maximum and Minimum using Divide and Conquer Technique | Lesson 18

Working Mechanism for Finding the Maximum and Minimum using Divide and Conquer Technique | Lesson 18

Find maximum element in an array (Largest element)

Find maximum element in an array (Largest element)

Linear Algebra  | Last Section | FCDS

Linear Algebra | Last Section | FCDS

10 простых алгоритмов сортировки

10 простых алгоритмов сортировки

Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7)

Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7)

3x3 INVERSE ~ AN EASY WAY

3x3 INVERSE ~ AN EASY WAY

Алгоритмы и структуры данных за 15 минут! Вместо 4 лет универа

Алгоритмы и структуры данных за 15 минут! Вместо 4 лет универа

Найти объединение за 5 минут — Структуры данных и алгоритмы

Найти объединение за 5 минут — Структуры данных и алгоритмы

физтех отжигает на псевдонаучке ФизФака МГУ Full HD

физтех отжигает на псевдонаучке ФизФака МГУ Full HD

МГИМО vs МФТИ : Кто умнее? / Школьные и нешкольные вопросы

МГИМО vs МФТИ : Кто умнее? / Школьные и нешкольные вопросы

Селёдка под шубой - классический (почти) рецепт

Селёдка под шубой - классический (почти) рецепт

Как война спасла Зеленского и к чему это привело?

Как война спасла Зеленского и к чему это привело?

2.7.1 Двусторонняя сортировка слиянием — итеративный метод

2.7.1 Двусторонняя сортировка слиянием — итеративный метод

1.5.1 Временная сложность №1

1.5.1 Временная сложность №1

Жизнь в симуляции: как сбоит реальность и почему мы этого не видим | Глеб Соломин

Жизнь в симуляции: как сбоит реальность и почему мы этого не видим | Глеб Соломин

Почему тебе противно работать? Правда, о которой никто не говорит!

Почему тебе противно работать? Правда, о которой никто не говорит!

AGI Достигнут! ChatGPT 5.2 Рвет ВСЕ Тесты! Внезапно OpenAI Выкатил Новую ИИ! Новая Qwen от Alibaba.

AGI Достигнут! ChatGPT 5.2 Рвет ВСЕ Тесты! Внезапно OpenAI Выкатил Новую ИИ! Новая Qwen от Alibaba.

7 признаков глупой женщины которые нельзя игнорировать

7 признаков глупой женщины которые нельзя игнорировать

Algorithm and Flowchart

Algorithm and Flowchart

Network Flows: Max-Flow Min-Cut Theorem (& Ford-Fulkerson Algorithm)

Network Flows: Max-Flow Min-Cut Theorem (& Ford-Fulkerson Algorithm)

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]