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
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.
*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;
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?
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
nice explaination 👏
Thank you!
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
Thanks for sharing!
Straight forward But you should have explained - why you iterated 24 time
i know that given constraint is n
Will improve, Thanks!
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.
thank you for the video. Radhe Radhe
Happy to help!
i
Yes, Thanks!
thank you so much maam
Happy to help!
Your explanation is very well 😊
Thanks!
*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;
Thanks for sharing!
really awesome explanation mam
Thanks! Glad you found it helpful.
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?
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
Great work!
You didnt put much efforts for this video plz make it clear and put actual values instead of assuming it... re-upload this video
Thanks for your feedback, I'll keep it in mind for future videos!
Poor explanation
Will improve, Thanks!
Not Clear enough, Please put more effort in your videos!
I appreciate the feedback, I'll try to make my explanations clearer in the future.