LeetCode Problem: 231. Power of Two | Java Solution

  Рет қаралды 1,991

Code for Interview

Code for Interview

Жыл бұрын

Given an integer n, return true if it is a power of two. Otherwise, return false.
leetcode.com/problems/power-o...
leetcode.com/problems/power-o...
leetcode.com/problems/power-o...
Find the complete playlist of LeetCode Problems
• LeetCode Problem: 709....
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
Do checkout other videos
Java Projects Playlist: • 1/12 - Bank Management...
JavaScript Projects Playlist: • JavaScript Projects
React Projects Playlist: • React Projects
MERN Stack Projects Playlist: • MERN Stack Projects
Spring Boot Full Stack Projects: • Full Stack Projects - ...
Next.js Projects Playlist: • Next.js Projects
Follow Us
Instagram: codeforinterview ( / codeforinterview )
Telegram: codeforinterview (t.me/codeforinterview)

Пікірлер: 13
@codeforinterview
@codeforinterview Жыл бұрын
If you have a better solution, please comment. and if you found this video helpful do check out the whole playlist kzbin.info/www/bejne/mYC1fGOPeriab6M
@zakky44A
@zakky44A Ай бұрын
Thanks God I came across your channel. You explain things in a very comprehensive manner. Keep it up!
@codeforinterview
@codeforinterview Ай бұрын
Welcome!
@roshankarwalkar7102
@roshankarwalkar7102 Ай бұрын
Better solution for this problem is - think in a binary way and binary operations are quicker then decimals public static boolean isPowerOfTwo(int number) { if (number 0111 1000 & 0111 = 0000 so answer is true
@codeforinterview
@codeforinterview 26 күн бұрын
Great solution.
@sanchitsingh6942
@sanchitsingh6942 Жыл бұрын
Thankyou bhaiya❤
@codeforinterview
@codeforinterview Жыл бұрын
❤️❤️
@sohrabhossain9905
@sohrabhossain9905 Жыл бұрын
Great explanation brother ❤️
@codeforinterview
@codeforinterview Жыл бұрын
Thank you 🙂
@NadeemKhan-pg3zm
@NadeemKhan-pg3zm Жыл бұрын
great explanation brother , upload more videos on leetcode qns🙂
@codeforinterview
@codeforinterview Жыл бұрын
Sure I will
@techhub216
@techhub216 Жыл бұрын
hello, last year i submitted a project library management system in my college minor, i cannot see that video now can u provide me any link to get that old video
@codeforinterview
@codeforinterview Жыл бұрын
few months back in an unfortunate incident, I lost my previous channel. So, I created this new channel now and I am re-creating all the videos again and I am yet to upload Library Management System project
LeetCode Problem: 217. Contains Duplicate | Java Solution
13:04
Code for Interview
Рет қаралды 4,8 М.
LeetCode Problem: 153. Find Minimum in Rotated Sorted Array | Java Solution
13:56
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 23 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 14 МЛН
LeetCode Problem: 118. Pascal's Triangle  | Java Solution
16:35
Code for Interview
Рет қаралды 1,1 М.
LeetCode Problem: 1. Two Sum | Java Solution
15:51
Code for Interview
Рет қаралды 6 М.
Power of Two | Multiple Approaches | Leetcode 231
17:16
codestorywithMIK
Рет қаралды 2,7 М.
LeetCode Problem: 20. Valid Parentheses | Java Solution
19:51
Code for Interview
Рет қаралды 1,5 М.
LeetCode Problem: 200. Number of Islands | Java Solution
20:28
Code for Interview
Рет қаралды 996
LeetCode Problem: 2. Add Two Numbers | Java Solution
19:25
Code for Interview
Рет қаралды 3,1 М.
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 23 МЛН