Пікірлер
@sujeetht669
@sujeetht669 14 сағат бұрын
Time limit exceeded
@DivyanshuDarshan-yd7ev
@DivyanshuDarshan-yd7ev Күн бұрын
dwarfed the problem🤔
@Adarsh_agrahari
@Adarsh_agrahari 2 күн бұрын
it too bad explanation
@abhishekgoyal7765
@abhishekgoyal7765 2 күн бұрын
Well explained, but I think the code can be reduced and improved
@manimtirkey861
@manimtirkey861 2 күн бұрын
Nice work. You can optimise a little bit by removing redundant code. just check "total == diff" once and perform the "while total == diff" until you get the best j and after you break you can check only once if(a[i].first-a[j].first+1<mini) inside the "total == diff" case and that would work as well. Good job though helped me get the intuition for this question.
@22gauravkumar70
@22gauravkumar70 9 күн бұрын
worst naming of variable i have ever seen
@LordHerculies7566
@LordHerculies7566 9 күн бұрын
kya bol raha hain khud samajh raha hain kya? English bola zaruri hain??
@shashankvashishtha4454
@shashankvashishtha4454 13 күн бұрын
bad explanation
@ashwinurewar5006
@ashwinurewar5006 14 күн бұрын
Please correct problem number
@JayeshBhadange-j5e
@JayeshBhadange-j5e 16 күн бұрын
Regarding Leaping task, while i was watching for first time it was really frustrating for me but after a quick 2nd recap it all made sense
@SaurabhGupta-cn5gz
@SaurabhGupta-cn5gz 16 күн бұрын
Great video I think we can use stack to get rid of using timestamps
@LordHerculies7566
@LordHerculies7566 22 күн бұрын
best one by far...Can you explain why did you take 1e11 in mini?
@codeExplainer
@codeExplainer 20 күн бұрын
just want to minize the value and thus initalized the value with a very large value.
@LordHerculies7566
@LordHerculies7566 20 күн бұрын
@@codeExplainer I use Macro in these cases..Do you think using macro causes problem later?
@codeExplainer
@codeExplainer 19 күн бұрын
no
@RahulSingh-ky4tk
@RahulSingh-ky4tk 23 күн бұрын
yeh bkl ytuber bnega haha rxxndva
@arafathdhroba8897
@arafathdhroba8897 23 күн бұрын
great
@latin_prologue
@latin_prologue 24 күн бұрын
Brilliant solution, explanation and code!
@KurumiddeKezia
@KurumiddeKezia 24 күн бұрын
u know what the most comedy problem in seen in leetcode yarr ,bcs code logic is already return in question😅
@youtechie2076
@youtechie2076 28 күн бұрын
useless video. i have already sovled this problem with this O(n*m) complexity came on youtube for watch a better solution . if you wanted to make the vedio solution then it should have been a better solution of O(n+m) time even a child can solve O(n * m). just don't upload videos on youtube just for shake of it. time waste
@_AnuragsinghThakur
@_AnuragsinghThakur Ай бұрын
wooow now i get it fot the first time after watching so many lectures
@ashhar7284
@ashhar7284 Ай бұрын
best explanation found!
@ritikshandilya7075
@ritikshandilya7075 Ай бұрын
great explanation
@akshatsharma_iiti
@akshatsharma_iiti Ай бұрын
tq 😘
@RohitSrivastava-s8e
@RohitSrivastava-s8e Ай бұрын
Perfect :)
@rohanthakur9159
@rohanthakur9159 Ай бұрын
Thanks for the awesome explanation
@JurajKaradza
@JurajKaradza Ай бұрын
Hi, Juraj here, one of the maintainers of Cyclops 👋, Loved the video, great to see it from the perspective of a contributor!
@divyanshudiwaniya
@divyanshudiwaniya Ай бұрын
Bhai difficult concept h hindi m pdhaya kro
@Anonymous____________A721
@Anonymous____________A721 Ай бұрын
Excellent Thank you so muchhhhhhhh
@mohdkhaleeq7468
@mohdkhaleeq7468 Ай бұрын
very good explanation bhai even i can't solve it
@hitanshugala9191
@hitanshugala9191 Ай бұрын
in second question why did you take that condition, like that condition will never come right as we are eliminating all the odd n so a can never be even
@explore_infinity
@explore_infinity Ай бұрын
It's also Pirates of carribbean
@explore_infinity
@explore_infinity Ай бұрын
Also practical organic chemistry
@Marian-h6y
@Marian-h6y Ай бұрын
Bhai , everyone does cp in c++. I am learing dsa in java. How to do cp in java? or should i swtich to c++.? Can you give resources how to start cp in java, or should i switch to cpp
@codeExplainer
@codeExplainer Ай бұрын
just use chat gpt to convert c++ code to java
@ssquare1
@ssquare1 Ай бұрын
nice solution man. loved it
@whiletrue1-wb6xf
@whiletrue1-wb6xf Ай бұрын
What I love here is that he is focused on the problem while his family is just going about their daily routine as if he isn't doing anything. hehe
@anujrathore5726
@anujrathore5726 Ай бұрын
GREAT EXPLANATION ❤
@parth_3856
@parth_3856 Ай бұрын
Insightful.................
@MARUFMURSHED-p8q
@MARUFMURSHED-p8q Ай бұрын
hello brother, I'm new in coding era... and your idea in this video helps me a lot to understand this logic... after this made little bit easy code thn you.. here it is int n, arr[123]; cin >> n; for(int i = 1; i <= n; i++){ int x; cin >> x; arr[x] = i; } for(int i = 1; i <= n; i++){ cout << arr[i] << " "; } return 0; btw thanks a lot
@deepakgarg9649
@deepakgarg9649 Ай бұрын
Thanks bro without watching your full video I got direct hint from your code and solved it by myself.
@adityaroychowdhury3709
@adityaroychowdhury3709 Ай бұрын
Quite an ingenious smart trick. i was thinking of actually tracking the addend throught the array. 1 + 2 + 4 + 8 and so on... Awsm implementation
@anshswaroop6849
@anshswaroop6849 Ай бұрын
Thank you sir ❤
@Flux-e4y
@Flux-e4y Ай бұрын
I came with the same approach but unable to write the code tbh
@noah_ayyubi
@noah_ayyubi Ай бұрын
bro group ur video in playlist u will get more views js 30 day challenge will need its own playlist
@Flux-e4y
@Flux-e4y Ай бұрын
it makes sense but the way of explanation is poor
@SREexplained
@SREexplained Ай бұрын
linear traversal should not be n*logN.
@swastiktiwari7066
@swastiktiwari7066 Ай бұрын
I don't think dp[i/j] + j means pasting i/j A's j times.......it means copying 1 time and pasting j-1 times making it a total of 1+j-1 = j operations. furthermore, I think j doesn't need to iterate from 2 to i ...iterating from 2 to i//2 'll suffice My C++ solution: class Solution { public: int minSteps(int n) { vector<int> dp(n+1,1000); dp[1] = 0; int count; for(int i = 1;i<=n/2;i++){ count = 2 + dp[i];//start with 1 copy+1 paste & then increment paste by 1 for (int j = 2*i;j<=n;j+=i) dp[j] = min(dp[j],count++); } return dp.back(); } };
@Marvel9-j4d
@Marvel9-j4d Ай бұрын
Bro . Stop saying COOL. again and again 😑😑😑
@codeExplainer
@codeExplainer Ай бұрын
😂😂😂
@10_arshnoorsinghkairon33
@10_arshnoorsinghkairon33 2 ай бұрын
i know this is a easy one, but still I was missing something and that's what your vdo helped me to see thanks :)
@parthdeshwal4419
@parthdeshwal4419 2 ай бұрын
mate don't make videos in english bcz you can't right words to explain something and it messes up the entire explaination
@saiei
@saiei 2 ай бұрын
no wonder u have 89 dislikes
@YASHBHARDWAJ-f9i
@YASHBHARDWAJ-f9i 2 ай бұрын
please always provide java code link also
@rahulnegi4027
@rahulnegi4027 2 ай бұрын
but the k is atmax 10 so we will have atmax 20 elements in the union so the time complexity wouldn't be O(N*20) i.e O(N) confused
@ganeshjaggineni4097
@ganeshjaggineni4097 2 ай бұрын
NICE SUPER EXCELLENT MOTIVATED
@codeExplainer
@codeExplainer 2 ай бұрын
Thanks a lot