Day: 41/365 📌 LeetCode POTD: Reverse Bits Easy Key takeaways/Learnings from this problem: 1. This problem really strengthens your bit manipulation basics—shifting and masking is all you need. 2. Big takeaway: when dealing with fixed 32 bits, just loop consistently and build the answer bit by bit without overthinking it. #POTD #365DaysOfCode #DSA #Java #ProblemSolving #LearningInPublic #Consistency 🥷
Nitin Yadav’s Post
More Relevant Posts
-
Day: 43/365 📌 LeetCode POTD: Binary Number with Alternating Bits Easy Key takeaways/Learnings from this problem: 1. This one shows how clean bit tricks can replace messy string checks when working with binary patterns. 2. Big takeaway: sometimes a small observation (like using XOR or shifting) turns a pattern problem into a super neat one-liner. #POTD #365DaysOfCode #DSA #Java #ProblemSolving #LearningInPublic #Consistency 🥷
To view or add a comment, sign in
-
-
Day 40 of 100 Days of Code 🚀 Solved Maximum Consecutive Ones today. 🔹 Problem: Find the longest streak of 1’s in a binary array. 🔹 Approach: Single pass with running counter. Key idea: - Increment count when we see 1 - Reset when we see 0 - Track maximum during traversal ⏱ Time Complexity: O(n) 📦 Space Complexity: O(1) Small problems strengthen logical thinking and loop control. #LeetCode #DSA #Java #100DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
Day: 52/365 📌 LeetCode POTD: Minimum Operations to Equalize Binary String Level: Hard Key takeaways/Learnings from this problem: 1. This one really makes you think in terms of mismatched positions instead of raw characters. 2. Greedy feels tempting, but you need to carefully compare operation costs before deciding what to fix first. 3. It’s a good reminder that binary string problems often reduce to counting patterns smartly. 4. Biggest takeaway: always try to simplify the string into a difference representation — the solution usually becomes much clearer. #POTD #365DaysOfCode #DSA #Java #ProblemSolving #LearningInPublic #Consistency 🥷
To view or add a comment, sign in
-
-
🚀 Day 94 of #100DaysOfCode Solved LeetCode #762 – Prime Number of Set Bits in Binary Representation ✅ A neat problem combining bit manipulation with a simple prime check. Key Takeaways: -> Using Integer.bitCount() for efficient set-bit counting -> Applying basic prime validation on computed bits -> Clean iteration over a given range Simple logic, but great for reinforcing bitwise fundamentals Language: Java -> Runtime: 4 ms (Beats 87.21%) ⚡ -> Memory: 42.28 MB Consistency is stacking up day by day. On to the next one. 💻🔥 #LeetCode #Java #BitManipulation #PrimeNumbers #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
🚀Day 12/30 LeetCode 190 | Reverse Bits (Easy) A classic bit manipulation problem that tests your understanding of binary operations and shifting. 💡 Key Concept Used: Bitwise AND (&) to extract the last bit Unsigned right shift (>>>) to move bits safely Left shift (<<) to build the reversed number #LeetCode #BitManipulation #Java #DSA #CodingInterview #ProblemSolving #SoftwareEngineering #Day12
To view or add a comment, sign in
-
-
Day: 44/365 📌 LeetCode POTD: Count Binary Substrings Easy Key takeaways/Learnings from this problem: 1. The real trick is noticing you don’t need to check every substring — just track lengths of consecutive 0s and 1s. 2. Big takeaway: many string problems become simple once you focus on grouping patterns instead of brute force counting. #POTD #365DaysOfCode #DSA #Java #ProblemSolving #LearningInPublic #Consistency 🥷
To view or add a comment, sign in
-
-
Day 15/100 – LeetCode Challenge Problem: Reverse Linked List Today’s problem focused on reversing a singly linked list using an iterative approach. Approach: Used three pointers to reverse the links: prev → keeps track of the previous node curr → current node being processed next → stores the next node before changing the link Steps: Store curr.next in next Reverse the link → curr.next = prev Move prev and curr one step forward Continue until the list ends. Finally, prev becomes the new head of the reversed list. Complexity: Time: O(n) Space: O(1) Concepts Practiced: Linked List pointer manipulation Iterative reversal technique In-place algorithm #100DaysOfCode #LeetCode #DSA #Java #LinkedList #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
#Day39 of #365DaysOfCode Solved Set Matrix Zeroes on LeetCode. Implemented an in-place matrix approach using the first row and column as markers to track zero positions. ✨ Lesson: Smart space optimization and careful traversal help solve matrix problems efficiently. #CodingJourney #DSA #Java #LeetCode #Consistency
To view or add a comment, sign in
-
-
Day 23 of #100DaysOfLeetCode Challenge ✅ 📌 Problem: String to Integer (atoi) – LeetCode #8 📊 Difficulty: Medium 💻 Language: Java Today I solved the classic atoi problem, which focuses on: Handling leading whitespaces Managing + / - signs correctly Converting digits safely Preventing 32-bit integer overflow & underflow ⚡ Performance: Runtime: 1 ms (Beats ~99%) Memory efficient solution This problem really tests edge case handling and string parsing logic, which is crucial for real-world input validation. Consistency over motivation — showing up every day matters. 💪 #Day23 #LeetCode #100DaysOfCode #Java #DSA #ProblemSolving #CodingJourney #Consistency #SoftwareEngineering
To view or add a comment, sign in
-
-
#day328 of #1001daysofcode problem statement (1758): Minimum Changes To Make Alternating Binary String An alternating binary string can only follow two patterns: "010101..." or "101010...". I counted the number of changes required to convert the string into both patterns and returned the minimum of the two. ⏱Time Complexity: O(n) 🧠Space Complexity: O(1) Consistency check ✅ One LeetCode problem a day to sharpen problem-solving skills. #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
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