Leetcode Weekly Contest 411 | Video Solutions - A to D | by Viraj Chandra | TLE Eliminators

preview_player
Показать описание
Here are the video solutions for problems A, B, C, D of Leetcode Weekly Contest 411. We hope this will be useful for you in up-solving this contest.



Solution Codes:

Be sure to check out TLE Eliminators.

Timestamps:-
0:00 Problem A
9:35 Problem B
25:40 Problem C
01:03:34 Problem D
Рекомендации по теме
Комментарии
Автор

your explaination of 4th problem was super awesome its crystal clear now for me

chandraveersingh
Автор

Hats off to the effort you put in for 7 ❤

stutirajput
Автор

In 4th question:
we have divided into two sub problems : [Lto pos-1] and [Pos to R]
Isnt it should be [L to mid-1] and [mid to R]
I think you have written it correctly in the code.

sudireddysairam
Автор

Sir, when 12.O batch is going to start.

amrishyadav
Автор

Great explanation. I have a doubt for the last question.

When we divide our query calculation into two subproblems, why do we use (diff)*(diff+1)/2 for the portion from l to pos-1 ?
Why can we not use prefix sum array to calculate the result like pref[pos-1] - pref[l-1] ?

ashreyjairath
Автор

what is the point of solving problem 3? If you are just going through each possibility !
Can't we just use Backtracking, maybe use weightage of each numbers and solve this problem?
I mean i am big fan of your effort you put in solution but in this case If we are not doing the question by traditional approach then I think we are not doing justice to the question.

ingeniousglobal
Автор

hello sir, i want to ask a question regarding codeforces, that in a contest, when i try to submit my solution, it mostly shows pretests passed instead of accepted, so can u please tell that what does it mean and how can this problem be resolved?
i will be really thankful.!!

filmymovies