Problem Solving -12| Print second largest element in an array| Python

preview_player
Показать описание
Welcome! In this video you will learn how to find second largest element in an array in optimal way. This a question asked in interviews.

Like Share and Subscribe
Рекомендации по теме
Комментарии
Автор

you did it greatly but maam please explain students by doing dry run
and best of luck for your channel;

kattar_sarcastic
Автор

I have a better method
Convert array into set and then use sorted method on it, pop one time so the largest element gets poped and then again return the 2nd poped element
🎉 You got the answer
I did this just now on hackerrank 😃
Am seeing other ways on YouTube

aayushsharma