Linkedin Interview Question | 1611. Minimum One Bit Operations to Make Integers Zero
Vložit
- čas přidán 13. 04. 2022
- *********************************************************************
Leetcode Experience Link - leetcode.com/discuss/intervie...
Problem Link - leetcode.com/problems/minimum...
Solution - leetcode.com/submissions/deta...
*********************************************************************
Videos similar to 1st question - • Leetcode BiWeekly 74 |...
*********************************************************************
Interview Experiences Playlists -
Microsoft - • Microsoft Interview Qu...
Amazon - • Amazon Interview Quest...
D.E.Shaw - • D.E.Shaw Interview Que...
Linkedin - • Linkedin Interview Que...
Facebook - • Facebook (Meta) Interv...
*********************************************************************
Please show support and subscribe if you find the content useful.
I tried this for almost 5hrs straight, wrote a bfs kinda solution, the observation is : numbers which have only one bit set the answer for them will be number*2 - 1. So, in the bfs solution i used one visited map which kept count of the numbers that are being visited, and then made the two choices and whenever we encounter a number which has only one bit set, we stop. Since we can just add number* 2 - 1. But this solution that you explained is a masterpiece, made me fall in love with it fr.
Great Explanation!
How does someone come up with solution for these questions in the time given....
only if u have done it prior
Practice
yero yero yero