Пікірлер
@Rajesh-fj5hm
@Rajesh-fj5hm Ай бұрын
thank sir, you discussed all the possible approaches
@shubhkanodia3583
@shubhkanodia3583 Ай бұрын
Hey can you please explain the use of set here? I watched the video multiple times but not sure why set is used
@PlacementsReady
@PlacementsReady Ай бұрын
To avoid repetitions
@Stark-s4s
@Stark-s4s Ай бұрын
there is a error incompatible types: int cannot be converted to boolean if(n&1){
@PlacementsReady
@PlacementsReady Ай бұрын
In c++ it works
@PlacementsReady
@PlacementsReady Ай бұрын
Which language are you using ?
@SaranshChauhan-e3l
@SaranshChauhan-e3l Ай бұрын
others were explaining the same approach but your explanation stuck in my mind now i will never forget this . Thanks (bring a dsa sheet solution one -two question a day) it will be great
@shubhamk840
@shubhamk840 2 ай бұрын
Bro , you have a got nice handwriting.
@PlacementsReady
@PlacementsReady 2 ай бұрын
Thanks bro 😊
@nayanikasinghachowdhury6747
@nayanikasinghachowdhury6747 2 ай бұрын
agar index -1 ho jayega then that case is not handled here.. woh if checking mai daalna padega right?
@PlacementsReady
@PlacementsReady 2 ай бұрын
Haan
@piyushsinghdtu456
@piyushsinghdtu456 2 ай бұрын
very nice
@DhineshKaviraaj
@DhineshKaviraaj 2 ай бұрын
Really great explanation SIr
@excitedelectron3951
@excitedelectron3951 3 ай бұрын
Why have we used Lucas at all? If Lucas finds n_iCr_i using factorial and mod exponentiation only, why not use that directly to find nCr?
@PlacementsReady
@PlacementsReady 3 ай бұрын
Because direct method won't work here due to constraints
@adityadwivedi8956
@adityadwivedi8956 4 ай бұрын
You gave the best explaination for this question throughout the internet
@Practice_dsa_together
@Practice_dsa_together 4 ай бұрын
Given an array of integers, check whether there is a subsequence with odd sum and if yes, then finding the maximum odd sum. If no subsequence contains odd sum, print -1. explain this
@Ybash2979
@Ybash2979 5 ай бұрын
are sir edges cases toh explain krdia kro and code mai bhi missing tha
@NeverLoose-v5i
@NeverLoose-v5i 6 ай бұрын
why we dont take the maximum element of the second array and add it to the all elements of the first array and maximum element of the first and add it to the second array elements and sort the whole vector to get the answer?
@avinashkumar4229
@avinashkumar4229 6 ай бұрын
Because sorting takes nlogn time we are supposed to solve this in O(n+m)
@TyagiAviral
@TyagiAviral 5 ай бұрын
Let first and second array have N elements. 1) Take max of first array and add it to all elements of second array, it will give N elements. 2) Take max of second array and add it to all elements of first array, it will give another N elements. (we will get sum of max of first with max second array twice but let's ignore for explanation). So, we get total 2N elements. If K is less than 2N it'll work but what if K is greater than 2N?
@NeverLoose-v5i
@NeverLoose-v5i 5 ай бұрын
@@TyagiAviral ok got it thanks
@nihalverma4577
@nihalverma4577 6 ай бұрын
Nice explanation bro
@xzlog6747
@xzlog6747 8 ай бұрын
Thank you so much this was much needed
@faizanahmed7485
@faizanahmed7485 10 ай бұрын
sols ?
@PlacementsReady
@PlacementsReady 10 ай бұрын
Meaning bro ?
@indrajeetdevre1296
@indrajeetdevre1296 10 ай бұрын
bhai itna accha video banaya, thoda awaj bhi de deta.
@PlacementsReady
@PlacementsReady 10 ай бұрын
Will improve from next set of videos.
@siddharth_helloworld1292
@siddharth_helloworld1292 10 ай бұрын
tle aaraha bhai ye apprach se
@PlacementsReady
@PlacementsReady 10 ай бұрын
Can you try once using priority queues
@siddharth_helloworld1292
@siddharth_helloworld1292 10 ай бұрын
expected time complexity is O(n*k), your time complexity is O(n*(n*log(n) + k)), is thereany faster approach ?
@ShivamSingh-xv4rw
@ShivamSingh-xv4rw 10 ай бұрын
Runtime error de rha after 1070 test case
@PlacementsReady
@PlacementsReady 10 ай бұрын
bro i couldn't check that because of the compilation issue at geeksforgeeks end hope u got it correct
@ShivamSingh-xv4rw
@ShivamSingh-xv4rw 10 ай бұрын
@@PlacementsReady give us code again using priority queue if you can
@stopmotion2739
@stopmotion2739 10 ай бұрын
Solution link bhi dal do
@ploughable
@ploughable 10 ай бұрын
Complexity is Time: O(n), Space: O(1)
@PlacementsReady
@PlacementsReady 10 ай бұрын
No time complexity will not be O(n) since n here is getting reduced after every iteration it will be something logarithmic.
@ploughable
@ploughable 10 ай бұрын
@@PlacementsReady hmm, you are right...
@stopmotion2739
@stopmotion2739 10 ай бұрын
Source code chahiye written 🙏🙏🙏
@PlacementsReady
@PlacementsReady 10 ай бұрын
added the solution link in video description.
@prakhargarg4166
@prakhargarg4166 11 ай бұрын
Why we are using extra space and time complexity as it is not allowed\
@PlacementsReady
@PlacementsReady 11 ай бұрын
O(16) space is considered constant only
@amaan6017
@amaan6017 11 ай бұрын
kahan ho bhai...aaj kal...we need you...more Graph questions please...!!!
@PlacementsReady
@PlacementsReady 11 ай бұрын
Sure amaan will continue.
@nhatvuquang6279
@nhatvuquang6279 Жыл бұрын
why is the last vertex visited likely a mother vertex? Can you explain it
@AkashL-f1o
@AkashL-f1o Жыл бұрын
bro pls make a video in english bro,south students also can able to learn...
@PlacementsReady
@PlacementsReady Жыл бұрын
Ok
@srikanthmathala940
@srikanthmathala940 Жыл бұрын
Sir , Why do we need i==n condition in the base case , If arr = [5, 2, 3, 10, 6, 8] sum = 10, we are achieving the required sum at the third index only then the function will not count this as a subset right?
@PlacementsReady
@PlacementsReady Жыл бұрын
It will count rest it will not pick when i == n it will count
@sushantsuman4329
@sushantsuman4329 Жыл бұрын
why ggf output is 6 and gfg is 7? both are same
@PlacementsReady
@PlacementsReady Жыл бұрын
Do a dry run according to algo u will understand
@rl2346g
@rl2346g Жыл бұрын
You don't just wait until all ends :)
@virat3293
@virat3293 Жыл бұрын
Hi bro hope doing well, could u plz continue❤❤❤
@PlacementsReady
@PlacementsReady Жыл бұрын
Yes bro will continue
@Movieeditspro
@Movieeditspro Жыл бұрын
Nice please keep this up it really helps if we get stuck in our POTD and it also saves us from breaking our long streak
@vivekghori5529
@vivekghori5529 Жыл бұрын
class Solution { public: long long sumOfDivisors(int N) { long long sum=0; for(int i=1;i<=N;i++) { sum+=i*(N/i); } return sum; } }; Thank you so much sir ❤👍
@vivekghori5529
@vivekghori5529 Жыл бұрын
hi
@PlacementsReady
@PlacementsReady Жыл бұрын
Hi bro
@suryakantabehera4901
@suryakantabehera4901 Жыл бұрын
Op
@ravikumarnemala2155
@ravikumarnemala2155 Жыл бұрын
nice explanation
@priyanshusahu6646
@priyanshusahu6646 Жыл бұрын
Finally ❤
@debashishtiu2919
@debashishtiu2919 Жыл бұрын
bhai energy kahan h ??
@PlacementsReady
@PlacementsReady Жыл бұрын
Will improve bro
@roastindeep3508
@roastindeep3508 Жыл бұрын
i thought you ended gfg problem of the day series
@PlacementsReady
@PlacementsReady Жыл бұрын
No no, I will continue
@pravatgorai
@pravatgorai Жыл бұрын
i face this error give me soution Runtime Error ! Test Cases Passed: 9 /1115 Time Limit Exceeded Your program took more time than expected.Expected Time Limit : 1.05sec
@PlacementsReady
@PlacementsReady Жыл бұрын
Refer description for solution links
@pravatgorai
@pravatgorai Жыл бұрын
thank you@@PlacementsReady
@diyasinghal8318
@diyasinghal8318 Жыл бұрын
can u please provide the solution of coding ninjas world cup ??
@AnadiHirpara
@AnadiHirpara Жыл бұрын
bhai DSA c++/java konsi language se start kre please suggest! With valid reason!
@PlacementsReady
@PlacementsReady Жыл бұрын
kzbin.info/www/bejne/kGWZan2tgLKdp80 I have explained this in this video
@Engineersguide0
@Engineersguide0 Жыл бұрын
nice explanation ❤
@PlacementsReady
@PlacementsReady Жыл бұрын
Glad you liked it
@sohag483
@sohag483 Жыл бұрын
thanks for helping me
@PlacementsReady
@PlacementsReady Жыл бұрын
Keep learning
@donaldtrump4592
@donaldtrump4592 Жыл бұрын
Hi Avinash, you are doing great work.
@PlacementsReady
@PlacementsReady Жыл бұрын
Thanks a ton
@ayansikari6281
@ayansikari6281 Жыл бұрын
Space complexity optimise kaise kare....
@AbhishekKumar-vr7sh
@AbhishekKumar-vr7sh Жыл бұрын
can use bst iterator for that
@PlacementsReady
@PlacementsReady Жыл бұрын
you can use stack based approach and iterate on both bst together