#day312 of #1001daysofcode problem statement (0190): Reverse Bits Extracted each bit using (n & 1), shifted the result left, and rebuilt the reversed number in exactly 32 iterations. #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
Reverse Bits in 32 Iterations: Java Solution
More Relevant Posts
-
𝗧𝗲𝘀𝘁𝗶𝗻𝗴 𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀 When tests require deep setup, they often mirror a deeply coupled system. Simplifying structure usually simplifies testing as well. #CleanArchitectureSeries #SpringBoot #SoftwareArchitecture #Java
To view or add a comment, sign in
-
#day314 of #1001daysofcode problem statement (0693): Binary Number with Alternating Bits Used XOR with right shift to transform alternating bits into a sequence of 1s, then applied the (x & (x + 1)) == 0 pattern(tocheck all bits are set bits or not). Sometimes bit tricks make problems beautifully simple. #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
To view or add a comment, sign in
-
-
#day316 & #day317 of #1001daysofcode problem statement (0762): Prime Number of Set Bits in Binary Representation problem statement (0868): Binary Gap Tracked positions of consecutive 1s using bit manipulation and computed the maximum distance between them. #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
To view or add a comment, sign in
-
-
🚀 Day 5 of #100DaysOfDSA (Java) Today was all about Loops & Control Flow 🔁 Covered: while loop do-while loop break and continue Practice problems using loop-based logic One thing I realized today 👇 Loops are simple in syntax but powerful in logic. They teach you how to think in patterns, repetitions, and edge cases. Understanding when to use: while (condition first) do-while (execute at least once) break (exit early) continue (skip iteration) …makes your code cleaner and more controlled. Small concepts. Big foundation. Consistency check: ✅ Day 5 done. 95 days to go. #DSA #Java #CodingJourney #100DaysOfCode #FutureFullStackDeveloper #LearningInPublic #DeveloperMindset
To view or add a comment, sign in
-
-
Day 52/100 Completed ✅ 🚀 Solved LeetCode – Merge Intervals (Java) ⚡ Implemented an interval merging approach by first sorting intervals based on their start times and then traversing them to combine overlapping ranges. 🧠 Used comparison logic to detect overlaps and update interval boundaries, ensuring that all overlapping intervals are merged efficiently. This approach avoids redundant checks and processes the intervals in a single pass after sorting. 💯 Strengthened understanding of interval problems, sorting strategies, and greedy traversal techniques commonly used in real-world scheduling and timeline merging scenarios. Profile: https://lnkd.in/gaJmKdrA #LeetCode #100DaysOfCode #Java #DSA #CodingPractice #ProblemSolving
To view or add a comment, sign in
-
-
Day 21 - Binary Search Key Idea: Implemented an iterative binary search to locate the target in a sorted array. Reduced the search interval by half in every iteration to achieve logarithmic runtime. Time Complexity: O(log n) #Day21 #LeetCode #Java #BinarySearch #DSA #Algorithms
To view or add a comment, sign in
-
-
Day 12/100 – LeetCode Challenge Problem: Middle of the Linked List Today’s problem focused on finding the middle node of a singly linked list. Approach: Used the Two-Pointer Technique (Slow & Fast pointers). slow moves one step at a time fast moves two steps at a time When fast reaches the end of the list, slow will be at the middle node Complexity: Time: O(n) Space: O(1) Concepts Practiced: Linked List traversal Two-pointer technique Efficient single-pass solution #100DaysOfCode #LeetCode #DSA #Java #LinkedList #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 7 of #100DaysOfDSA (Java) Today’s focus: Functions & Methods Learned and practiced: Method declaration & return types Parameters & arguments Call by value in Java Breaking problems into reusable functions Big realization today 👇 Good programmers don’t write long code. They break problems into small, reusable methods. Understanding how to: Return values properly Pass inputs correctly Structure logic inside methods …makes code cleaner, readable, and professional. Day 7 ✅ Building logic. One step at a time. #DSA #Java #100DaysOfCode #CodingJourney #SoftwareDeveloper #LearningInPublic #DeveloperGrowth
To view or add a comment, sign in
-
-
Day 109 🚀 | Restore String (LeetCode) Rebuild the string using index mapping 🔁 👉 Place each character at its correct position ⏱ O(n) | 📦 O(n) Consistency > everything 💪 #Day109 #LeetCode #DSA #Java #GeekStreak #CodingJourney
To view or add a comment, sign in
-
𝗦𝗲𝗽𝗮𝗿𝗮𝘁𝗶𝗼𝗻 𝗼𝗳 𝗖𝗼𝗻𝗰𝗲𝗿𝗻𝘀 Mixing responsibilities often feels efficient in the short term. The cost typically appears later, during modification. #CleanArchitectureSeries #SpringBoot #SoftwareArchitecture #Java
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development