What's the time and space complexity and their percentage among others
@harshitmishra16734 күн бұрын
how you developed your logic skill.. i am trying hard but still lacking can you help me please
@ssss221444 күн бұрын
Please create videos in English, I am from Telugu I also understand English but not Hindi
@ssss221444 күн бұрын
Nice explanation, try to make it in English
@animeshkumar5644 күн бұрын
at 9:20 why r u taking the ans =n+1 or 4 ?
@algorithmsbyaditi4 күн бұрын
We take it because we cannot take -1, as we're using the min function. Taking n+1 ensures that it is an impossible case, as Subarray length cannot be more than the length of the array. So when we return ans, we ensure that ans is not n+1, otherwise we return -1.
@khushantwankhede83115 күн бұрын
Thankyou so much maam , Radhe radhe !
@algorithmsbyaditi4 күн бұрын
Glad it was helpful!
@harishbehera78125 күн бұрын
Radhe Radhe. thanx you for the solution. really very helpful.
@algorithmsbyaditi4 күн бұрын
Glad it was helpful!
@NishantPandat-l3q5 күн бұрын
aur voice bhi thoda tej kar dijiye mam
@NishantPandat-l3q5 күн бұрын
good explain mam....sath me thod concept bhi explain kr diya karo
@algorithmsbyaditi4 күн бұрын
Will improve, Thanks!
@ANKITVERMA-yu4ro5 күн бұрын
Thank you di. solved today's problem of the day 😃
@algorithmsbyaditi4 күн бұрын
Glad to hear it!
@CrazyRD-h4d5 күн бұрын
❤❤
@devenderkokkonda30755 күн бұрын
Hii
@heyRay811945 күн бұрын
🙇🙇
@lazy_bug42465 күн бұрын
Your videos are good but you should try a different type of thumbnail with better font (don't mean to offend you or anything content is top notch)
@algorithmsbyaditi5 күн бұрын
Thanks for your suggestion, I will try to change it asap!
@Abhishek_12005 күн бұрын
You got a subscriber !
@khushantwankhede83116 күн бұрын
thankyou !! radhe radhe
@Fab_Future_Coder6 күн бұрын
hey! please reply me, In my problem the return type of method was INT and when i code same as u one test case was not passed and i see the difference in your code that is return type LONG. All the thing is here ( n = 6715154, x = 7193485 and expected 55012476815 and output -822098033). why the difference please..... tell.......... RADHE RADHE............
@dayashankarlakhotia49436 күн бұрын
public long minEnd(int n,int x){ n--; long mask=x; for(long i=1;n>0;i<<=1){ if((i&x)==0){ mask|=(n&1)*i; n>>=1; } } return mask; tc=nlogn ==64 bits 0(1); sc=0(1); 🎉❤
@heyRay811945 күн бұрын
if possible can anyone explain this solution also.. @algorithmsbyaditi
@dayashankarlakhotia49435 күн бұрын
@heyRay81194 Explanation is if n=2,x=7, I =1 1&7!=0 i=2,2&7!=0,i=4&7!=0,i=8&7==0; 7|=(n=1&1)=1*8; 7|8=15; n>>1 n==0; mask=15;
@heyRay811945 күн бұрын
@@dayashankarlakhotia4943 🙇🏻
@harishbehera78126 күн бұрын
thanx for the video . Radhe Radhe
@algorithmsbyaditi6 күн бұрын
Glad it was helpful!
@user-tj4kc9re9t6 күн бұрын
Intution :1) we need the smallest no from which AND operation provde x . 2) Thats mean we need to perform OR operation to keep intact the set bits . 3) But why need to perform the OR from justt greater no ,cuz from that it helps to get the extra set bits like 7-111 8-1000 in this case we get the first extra set bit ,these edge case is being perfomed by this OR operation with next no .
@algorithmsbyaditi6 күн бұрын
Great work!
@RarePsych6 күн бұрын
Amazing Explaination ! you got a subscriber
@algorithmsbyaditi6 күн бұрын
Glad you found it helpful!
@namratainani43586 күн бұрын
how to approach to the solution by our own mam....because after seeing the video I am knowing it...I am struggling to come up with the solution...please help me
@algorithmsbyaditi6 күн бұрын
Practice is key, keep working at it and you'll get better at coming up with solutions!
@Shashwat4936 күн бұрын
please continue solving these daily leetcode questions ......also I request you to make your 300-400 leetcode questions sheet with their video solutions by you in java ......as there is a lot of questions and study material in c++ but not in java ......and your explanation is crystal clear and easy to understand so I request you to do so ......as it will be very helpful for our placements
@algorithmsbyaditi6 күн бұрын
Thanks for your request! I'll definitely keep making these daily LeetCode videos, and I'll think about creating a Java solution playlist.
@hariomverma46596 күн бұрын
feeling like a dumb.
@algorithmsbyaditi6 күн бұрын
It's alright, keep practicing!
@veerrajput40806 күн бұрын
Great explanation✌
@algorithmsbyaditi6 күн бұрын
Glad you liked it
@akashdhama4976 күн бұрын
mam you are doing great please also add DSA course in java
@algorithmsbyaditi6 күн бұрын
Thanks for the suggestion!
@zoro-bt7ql6 күн бұрын
i think you girl lose your way i show you if you want ,
@AnmolSingh-kb4ne6 күн бұрын
Mam, I was struggling to come up with an approach to solve the problem. I couldn’t think of a solution, but after watching your video, I understand it better. Thank you!
@algorithmsbyaditi6 күн бұрын
Glad I could help!
@Sumanth28036 күн бұрын
nice explanation Radhe Radhe🤗🤗🤗
@algorithmsbyaditi6 күн бұрын
Thank you
@jimit27957 күн бұрын
Nice
@algorithmsbyaditi6 күн бұрын
Thanks
@harishbehera78127 күн бұрын
thanx for the solution Radhe Radhe
@algorithmsbyaditi6 күн бұрын
Glad you found it useful!
@sriajays68257 күн бұрын
explain in english
@Fab_Future_Coder6 күн бұрын
No
@crekso3987 күн бұрын
thank you so much
@algorithmsbyaditi6 күн бұрын
Thank you
@unknown-mf7dd7 күн бұрын
just ezplain whole thing in english plz
@Fab_Future_Coder6 күн бұрын
No
@heyRay811947 күн бұрын
nice explaination 👏
@algorithmsbyaditi7 күн бұрын
Thank you!
@thecodecrafted7 күн бұрын
i<24 kro = hatao isko last 24bit tk hi jana hai isliye fayda hoga 8ms ka
@algorithmsbyaditi7 күн бұрын
Yes, Thanks!
@harishbehera78128 күн бұрын
thank you for the video. Radhe Radhe
@algorithmsbyaditi7 күн бұрын
Happy to help!
@iamheroboss16558 күн бұрын
Didi thanks i solved in bubble sort know i understand clearly thses optimal solution
@algorithmsbyaditi7 күн бұрын
Glad to hear this!
@satyasanjay13398 күн бұрын
*With this simple formula, you can find how many bits are required to represent a number. This is for Java, you will find something similar in other languages.* int noOfBits = (int)(Math.log(num)/Math.log(2)) + 1;
@algorithmsbyaditi8 күн бұрын
Thanks for sharing!
@Astro-Coder8 күн бұрын
Straight forward But you should have explained - why you iterated 24 time i know that given constraint is n<10^7 (log 10^7 = 24 bits) but what if given n < 10^14
@algorithmsbyaditi8 күн бұрын
Will improve, Thanks!
@vishnu620408 күн бұрын
You can iterate over 32bits but that doesn't make sense to iterate over 0's as per the constraints. Infact you can go more above it as per constraints given in problem.
@nittya20038 күн бұрын
Radhe Radhe :)
@crekso3988 күн бұрын
thank you so much maam
@algorithmsbyaditi8 күн бұрын
Happy to help!
@NikhilRaj-ox6lr8 күн бұрын
as few of uuh are getting problem so i can explain a lil 10^7=10,000,000 in decimal. Binary Representation of 10,000,000: Converting 10,000,000 to binary, we get =100110001001011010000000 This binary representation has 24 bits. so we have to iterate each bit(from 1st bit till 24th) of respective element to check how many of them contain 1 at that particular bit position and then have to return the highest of them
@algorithmsbyaditi8 күн бұрын
Thanks for sharing!
@bhartirana63878 күн бұрын
hello mam, i really appreciate your efforts but this question i really did not understand, how you made combination and their value assumed i want to know how it is done, and how the answer is 4, could you please clear my doubt?
@NikhilRaj-ox6lr8 күн бұрын
Decimal Value: 10^7=10,000,000 in decimal. Binary Representation of 10,000,000: Converting 10,000,000 to binary, we get =100110001001011010000000 This binary representation has 24 bits. so we have to iterate each bit(from 1st bit till 24th) of respective element to check how many of them contain 1 at that particular bit position. and then have to return the highest of them