Day: 40/365 📌 LeetCode POTD: Add Binary Easy Key takeaways/Learnings from this problem: 1. This one’s a reminder that binary addition is just normal addition with a carry you manage manually, nothing fancy. 2. Big takeaway: when strings represent numbers, think digit-by-digit from the end — clean logic > converting to integers. #POTD #365DaysOfCode #DSA #Java #ProblemSolving #LearningInPublic #Consistency 🥷
Binary Addition Challenge: Simplifying Digit-by-Digit Approach
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: 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 🥷
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 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
-
-
#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 24/180 | #180DaysOfCode 📍 LeetCode | 💻 Java Solved: 2859. Sum of Values at Indices With K Set Bits Used bit manipulation to count the number of set bits in each index and summed the values whose index contains exactly k set bits. ⏱️ Time Complexity: O(n log n) 📦 Space Complexity: O(1) Strengthening understanding of bitwise operations and binary representation through consistent practice. 💪 Consistency continues 🚀 #DSA #LeetCode #Java #CodingJourney #Consistency
To view or add a comment, sign in
-
-
🚀 Day 73 / 100 Days of LeetCode Question: Check if Binary String Has at Most One Segment of Ones Given a binary string s, determine whether it contains at most one continuous segment of '1's. Solved in Java by checking whether the pattern "01" exists in the string. If "01" appears, it means a new segment of 1s starts after a 0, which violates the condition. This provides a clean and efficient solution. Consistency > perfection. Day 74 loading 🔥 #100DaysOfCode #LeetCode #Java #DSA #ProblemSolving
To view or add a comment, sign in
-
-
#day334 of #1001daysofcode problem statement (1009): Complement of Base 10 Integer 💡 Approach: To find the complement of a number, I converted it into binary and flipped every bit (0 → 1 and 1 → 0). After flipping the bits, the resulting binary string was converted back to decimal. Example: 5 → Binary: 101 Complement: 010 → 2 ⏱ Time Complexity: O(log n) 🧠 Space Complexity: O(log n) #1001DaysOfCode #DSA #Java #LeetCode #ProblemSolving Shivam Mahajan #leetcode
To view or add a comment, sign in
-
-
Day 84/365 ✔️ Solved LeetCode 26 – Remove Duplicates from Sorted Array using Java. A classic two-pointer problem that looks simple but really tests how well you handle in-place updates. Key takeaways from today: • Leveraged the two-pointer technique • Modified the array in-place with O(1) extra space • Preserved the relative order of elements • Reinforced how sorted arrays simplify logic Consistency > intensity. One problem a day, building strong fundamentals. On to the next 🚀 #Day84 #365DaysOfCode #LeetCode #Java #DSA #TwoPointers #ProblemSolving #Consistency
To view or add a comment, sign in
-
Explore related topics
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