Find Largest Element in Array | C++ | Arrays | Data Structures | GeeksForGeeks |

preview_player
Показать описание
PROBLEM : 🤔❓
Given an array of size n. The task is to find the largest element in it.

Example :

Input:
n = 5
A[] = {1, 8, 7, 56, 90}
Output:
90
Explanation:
The largest element of given array is 90.

----------------------------------------------------------------------------------------------------------

SOLUTION : 💡

Steps :
1. Consider FIRST element as the LARGEST element.
2. Loop through all elements in the Array.
3. If any element is GREATER than the LARGEST element variable.
4. REPLACE this particular element as the LARGEST element.

----------------------------------------------------------------------------------------------------------

Website : GeeksForGeeks
Programming Language : C++

----------------------------------------------------------------------------------------------------------

Keywords / Search Terms : 🔍

c++ tutorial for beginners
largest element in array
c++ programming
coding
coding placement
c++
Arrays
Data Structures
Data Structures and Algorithms
GeeksforGeeks
GFG
GFG arrays
GFG Data Structures
GFG Data Structures and Algorithms
GFG Editorial
GFG Practice
GFG C++
Coding Beginner to Advanced
Coding Problems
Programming Problems
Hindi Tutorial Coding C++
Hindi Tutorial Array
Hindi Tutorial Data Structures and Algoritms
Hindi Tutorial DSA

----------------------------------------------------------------------------------------------------------

HASHTAGS :

#c++
#largestelement
#gfg
#geeksforgeeks
#coding
#programming
#placement
#array
#arrays
#gfgeditorial
#beginnertoadvanced
#beginner
#beginnertutorial
#programmingtutorial
#hinditutorials
#hindidsa
#hindidatastructures

----------------------------------------------------------------------------------------------------------

Timestamps ⏱
0:00 Intro
0:11 Problem Explanation
0:36 Solution Explanation
1:51 Solution Coding
3:40 Compiling & Submitting
4:12 Outro

----------------------------------------------------------------------------------------------------------

If any doubts are concerns, please comment below, I will try to answer the questions.

DSA | Data Structures and Algorithm Problem Solver

Thanks
Рекомендации по теме
join shbcf.ru