Time Limit Exceeded - How to avoid it?

preview_player
Показать описание
A large number of students always complaint that the problems in Competitive Programming always comes with TLE(Time Limit Exceed) error.

The primary problem with this error is that it only indicates you have ot written your code in the optimal way.

In this video we have explained how can you put your code in optimal way.

Enjoy.

Sign up here: ?utm_source=youtube&utm_medium=18991230

------Popular Edyst Courses:------

------------------------- Follow us -------------------------
Рекомендации по теме
Комментарии
Автор

I use python for dsa, do i get more time exceeded errors while running the code compared to cpp or java ?

sanjayreddy
Автор

let price=[20, 7, 8, 2, 5]
let min=Infinity;
for(let i=0; i<=price.length-1;i++){

for(let j=i+1; j<=price.length-1;j++){


if(min>price[i]-price[j]){
min=price[i]-price[j]
}
}

}

}
console.log(min)
how to reduce tel????

mitkumarpatel