No video

(Remade) Leetcode 190 - Reverse Bits of An Integer | Bits Manipulation

  Рет қаралды 25,745

Nideesh Terapalli

Nideesh Terapalli

Күн бұрын

Topic: Bits
Code:
github.com/Nid...
Leetcode:
leetcode.com/p...
Note I claim no rights to this question. All rights belong to Leetcode. If I'm reviewing a solution that was from another Leetcode user or Leetcode itself I will give credit below.
Credit to :
Hey there! Just wanted to let you know that some of the below links in this video description are affiliate links, which means that if you make a purchase through them, I may earn a small commission. Don't worry though, it doesn't cost you anything extra and it helps support this channel so I can continue to make more videos for you. Thank you so much for your support, and as always, all opinions are my own!
Start getting great at system design: bytebytego.com?fpr=nideesh (affiliate link)
Handpicked Algorithms and Data Structures for Interview To Save Time: interviewpen.c... (affiliate link)

Пікірлер: 71
@NideeshTerapalli
@NideeshTerapalli Жыл бұрын
Hey there! Just wanted to let you know that some of the links in this comment are affiliate links, which means that if you make a purchase through them, I may earn a small commission. Don't worry though, it doesn't cost you anything extra and it helps support this channel so I can continue to make more videos for you. Thank you so much for your support, and as always, all opinions are my own! Start getting great at system design: bytebytego.com?fpr=nideesh (affiliate link) Handpicked Algorithms and Data Structures for Interview To Save Time: interviewpen.com/?via=nideesh (affiliate link)
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
6:17 should be "|" instead of "||," made a mistake
@Kai-iq2ps
@Kai-iq2ps 3 жыл бұрын
Followed. Saw 5 other videos, didn't understand sht. You explained beautifully my friend.
@rrsonia10
@rrsonia10 4 жыл бұрын
Thanks for remaking this video :) , very clearly explained!
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Thanks Sonia :)
@dincerbeken5761
@dincerbeken5761 2 жыл бұрын
Your videos are really the best.
@kushal1
@kushal1 4 жыл бұрын
Thanks. Really well explained! Suggestion - Just be louder. I have to be in super silence to hear you out or on headphones and definitely need subtitles to not miss out on any word. :)
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Hi KVM, thank you for your suggestion. Yes, I started using a different microphone system since this video to record audio.
@geekystark3208
@geekystark3208 4 жыл бұрын
fantastic. Please don't stop making more videos. This is the first video of yours that I saw and it was amazing.
@1aggin_5amurai
@1aggin_5amurai 3 жыл бұрын
Nice explanation, gave me good insight into how to use bit operations. But why use list as a buffer? You can change bits in resulting number in place using techniques you've described. Example (sloppy): int bits = bytes * G_bitsInByte; // just in case we want to work with 32 and 64 bit integers int result = 0; while( bits > 0 ) { int bit = number & 1; // retreving 1st bit result |= bit >= 1; bits--; } return result;
@shreyakumari71
@shreyakumari71 3 жыл бұрын
Beautifully explained. No room for doubts. Thank you!
@trifacheung
@trifacheung 4 жыл бұрын
Thanks, man. I just get in touch with this kind of problem. I have understood the concept of this after watching your tutorial
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Thanks Jason
@carloslazarin
@carloslazarin 2 жыл бұрын
Great explanation! thx a lot!
@dhananjaysharma1928
@dhananjaysharma1928 4 жыл бұрын
Great explanation. Just one doubt. The list is completely optional right? I mean we can simply keep adding temp variable to the result within the same loop. The additional storage list is completely optional right? It doesnt change our time complexity but it can affect the space complexity !
@hurfyd
@hurfyd 3 жыл бұрын
correct the list is optional. in one loop we can left shift the temp result variable, set the last bit with the OR operator, then right shift our input - res = res > 1
@AnkitKumar-tp8hc
@AnkitKumar-tp8hc 3 жыл бұрын
Saw almost 10 videos over internet, but you explained beautifully. ❤️
@Kai-iq2ps
@Kai-iq2ps 3 жыл бұрын
Same, this dude good
@anushree3744
@anushree3744 4 жыл бұрын
Well explained. Subscribed. I have one question though. Will the implementation handle the condition stated in note, what if the function is called multiple times?
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Hi Anushree, no this implementation will not handle multiple function calls. For that I would go for something else like a bit mask
@techbhupi9398
@techbhupi9398 4 жыл бұрын
Please increase the volume
@sagarakshayan1184
@sagarakshayan1184 3 жыл бұрын
n will eventually become 0, dont think temp -- required
@anushkabagchi1247
@anushkabagchi1247 3 жыл бұрын
thanks for explaining from scratch .. helped allot
@ANANDJULU
@ANANDJULU 3 жыл бұрын
Thank you for the detailed explanation, got what I was exactly looking for :)
@abhiramsathiraju6276
@abhiramsathiraju6276 2 жыл бұрын
ughhh!!! the accent 🔥🔥
@theworsttake
@theworsttake 3 жыл бұрын
Thank you for the thorough explaination. But please, slap an audio compressor.
@NideeshTerapalli
@NideeshTerapalli 3 жыл бұрын
Yeah I got a different mic 🎤 now
@theworsttake
@theworsttake 3 жыл бұрын
@@NideeshTerapalli sick
@olafo0o797
@olafo0o797 3 жыл бұрын
Really easy to understand your explanation Thank You
@biswamohandwari6460
@biswamohandwari6460 3 жыл бұрын
Just one thing please increase the sound
@avert_
@avert_ 4 жыл бұрын
Excellent!
@sagarkumarbala5257
@sagarkumarbala5257 2 жыл бұрын
Thanks man... keep up the good work!
@hakoHiyo271
@hakoHiyo271 3 жыл бұрын
Very nice and clear explanation. Thank you!
@suawasthi
@suawasthi 5 жыл бұрын
Awesome brother
@NideeshTerapalli
@NideeshTerapalli 5 жыл бұрын
Thank you
@tresorbireke
@tresorbireke 4 жыл бұрын
Thanks for this clear explanation sir
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
You're welcome
@drew982
@drew982 4 жыл бұрын
Can someone explain this in terms of an assembly program for ARM Cortex-M? I know there are REV commands available, but I'm being asked not to use them.
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Sorry dude assembly language was not my forte at all
@drew982
@drew982 4 жыл бұрын
Understandable! Assembly is all over the place anyway. I was hoping to maybe translate some of the concepts in your videos to my application which proved to be more difficult than anticipated. I did like your explanation though. It was well conveyed.
@vivekgr3001
@vivekgr3001 4 жыл бұрын
Thanks for the great explanation!
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Welcome Vivek
@maxching2000
@maxching2000 4 жыл бұрын
well done, very clear
@vibekdutta6539
@vibekdutta6539 5 жыл бұрын
You are awesome sir! I'd love to be a patreon member!
@NideeshTerapalli
@NideeshTerapalli 5 жыл бұрын
Thanks Vivek!
@emmanueljakaregari16
@emmanueljakaregari16 4 жыл бұрын
How to find a Max of two numbers using ONLY bitwise operator s
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
If there is non-private LC question you can ask me
@shreyachaturvedi9782
@shreyachaturvedi9782 4 жыл бұрын
Thank you!! @Nideesh
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Welcome Shreya
@momchilantonov1419
@momchilantonov1419 4 жыл бұрын
nice video! can you pls write with bigger letters on this white board? it will be better and more clear for understanding :)
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Thanks. Yeah sure I will write bigger
@deepakdas4513
@deepakdas4513 5 жыл бұрын
Nice explanation.
@NideeshTerapalli
@NideeshTerapalli 5 жыл бұрын
Thanks bro
@contentprogramming
@contentprogramming 4 жыл бұрын
clean job broo i like it 😀
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Thanks man, feel free to give me some feedback on how i can improve
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
Ok I will keep that in mind thanks
@abhinavghosh725
@abhinavghosh725 4 жыл бұрын
can someone explain : how 00110 -> 01100 00110 01100 ? shouldnt it be 00110 11001 ? we are reversing the individual bits right?
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
No that is called inverting the bits. Reversing means actually turning front to back
@abhinavghosh725
@abhinavghosh725 4 жыл бұрын
​@@NideeshTerapalli o shit!! i understood the question wrong! thnx man
@abhinavghosh725
@abhinavghosh725 4 жыл бұрын
@@NideeshTerapalli i finally understood the solution! good work! brother ,can you suggest some resources to understand bit manipulation from the very basics and gradually to the top! I AM KINDA struggling with this! thank you in advance. and one more thing in the last statement shouldn't it be res=res|l.get(i) rather than res=res||l.get(i)
@NideeshTerapalli
@NideeshTerapalli 4 жыл бұрын
@@abhinavghosh725 Yeah, looks like the first 10 slides and short and quick for the basics web.stanford.edu/class/archive/cs/cs107/cs107.1186/lectures/02-bits.pdf Afterward, best advice would be to pick a small textbook with good diagrams. Textbooks will help you learn faster and remember better than watching videos like mine. Why is that? Because textbooks have questions and exercises at the end of the chapter. After all, textbooks are designed to teach dense material in the best way possible
@abhinavghosh725
@abhinavghosh725 4 жыл бұрын
@@NideeshTerapalli thnx man! you are the best! please explain why you did " || " instead of " | " ?
@jianwenliu458
@jianwenliu458 5 жыл бұрын
So clear
@maheshdudhanale9953
@maheshdudhanale9953 4 жыл бұрын
Thanks
@aayushnevatia7
@aayushnevatia7 4 жыл бұрын
very poor sound
@mrprime557
@mrprime557 Жыл бұрын
Nitesh Naineni
Leetcode 29 - Bit Manipulation | Divide Two Integers
9:32
Nideesh Terapalli
Рет қаралды 61 М.
(Remade) Subsets I | Leetcode 78 | Backtracking
9:41
Nideesh Terapalli
Рет қаралды 10 М.
Dad gives best memory keeper
01:00
Justin Flom
Рет қаралды 20 МЛН
The Joker kisses Harley Quinn underwater!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 39 МЛН
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 33 МЛН
Reverse Bits | LeetCode 190 | C++, Java, Python
22:02
Knowledge Center
Рет қаралды 24 М.
Climbing Stairs
5:35
Kevin Naughton Jr.
Рет қаралды 99 М.
Reversing all the bits in an integer
15:18
CodeVault
Рет қаралды 12 М.
(Remade) Leetcode 69 - Sqrt(x) | Binary Search
7:00
Nideesh Terapalli
Рет қаралды 6 М.
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
(Remade) Leetcode 169 - Divide And Conquer | Majority Element
5:17
Nideesh Terapalli
Рет қаралды 11 М.
Reverse Bits || LeetCode 190 || Bit Manipulation
6:03
BarikZone
Рет қаралды 26 М.
(Remade) Longest Univalue Path | Binary Tree | Leetcode 687
6:04
Nideesh Terapalli
Рет қаралды 5 М.
Reverse bits in any given number using C
5:22
CloudyCodes
Рет қаралды 329
Sieve of Eratosthenes | Count Primes | Leetcode 204
5:08
Nideesh Terapalli
Рет қаралды 6 М.
Dad gives best memory keeper
01:00
Justin Flom
Рет қаралды 20 МЛН