Find the 3 largest elements in the Array
Simple Approach will update soon with the newly learnt approach. :)
let arr = [1,2,3,3,4,5,4,6,7,7,7,8,9,10,10,10,10]
let n = arr.length
function thirdLargest (arr,n){
let first, second , third ;
second = first = third = Number.MIN_VALUE
if(n<3)
{ c...
ankushsrj.hashnode.dev1 min read