Day 42 of consistency 🚀 Today’s problem was about counting binary strings of length n without consecutive 1s. A simple-looking question, but it beautifully turns into a DP + Fibonacci pattern problem. Key takeaway: not every counting problem needs brute force — sometimes, just tracking valid endings is enough. Little by little, these patterns start repeating — and that’s where real improvement happens. #GeeksforGeeks #DSA #Python #DynamicProgramming #CodingJourney #ProblemSolving #100DaysOfCode #geekstreak60 #npci
Counting Binary Strings without Consecutive 1s via DP and Fibonacci
More Relevant Posts
-
Day 06/50 – LeetCode Solved Increasing Triplet Subsequence (#334) Learned how a simple greedy approach can replace brute force: Track two values (first, second) and detect a third larger number. Result: O(n) time | O(1) space Key takeaway: Smart tracking > checking all combinations Dhanraj Sahu #Day06 #LeetCode #DSA #Python #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day [21] of #Geekstreak60 Today’s #POTD was Two Equal Sum Subarrays — a neat exercise in prefix sums, binary search, and validation logic. I solved it in Python using multiple approaches: ✅ Direct prefix sum check ✅ Hash set tracking for generalized detection ✅ Binary search on prefix array for efficient lookup Each method reinforces how different strategies can converge on the same solution, sharpening problem‑solving skills and adaptability. #Coding #Python #Geekstreak60 #ProblemSolving #DSA #GeeksforGeeks #Geekstreak2026 Problem Link : https://lnkd.in/gzdaVpnr Solution Link : https://lnkd.in/gvdHSgwR
To view or add a comment, sign in
-
-
Day 50/60 #geekstreak60 Solved Intersection of Two Sorted Arrays today. A simple yet important problem that highlights the efficiency of the two-pointer approach — allowing us to find common elements in O(n + m) time while handling duplicates smartly. Problems like these may look basic, but they strengthen core DSA thinking and improve logic with every step. 💻 #geekstreak60 #npci #DSA #Python #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Day 49/60 #geekstreak60 Solved Segregate 0s and 1s today. A simple yet useful problem that teaches the power of the two-pointer approach — solving efficiently in O(n) time and O(1) space without extra memory. Small problems like these build strong problem-solving habits step by step. 💻 #geekstreak60 #npci #DSA #Python #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Day 110 Same pattern, new constraint. #Day110 🧩 90. Subsets II How today went: • Very similar to the basic Subsets problem • First step: sort the array • While iterating, skip duplicate elements to avoid repeating subsets • Use the same backtracking pattern: append → recurse → pop What I learned: The core pattern stays the same — only the duplicate handling logic changes. This small condition makes a big difference. Backtracking is becoming more predictable now. #LeetCode #DSA #Python #Backtracking #Recursion #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
LeetCode Progress Update — 18/100 Just solved “415. Add Strings” This problem was a great reminder that sometimes the best solutions come from going back to fundamentals — in this case, simulating manual addition digit by digit instead of relying on built-in conversions. Key Takeaways: Handling numbers as strings strengthens problem-solving skills Mastering carry logic is essential for many algorithmic problems Clean, efficient logic > shortcuts Problem Level: Easy Concepts: String Manipulation, Simulation Every step forward counts. On to the next one! #100DaysOfCode #DSA #LeetCode #ProblemSolving #CodingJourney #Python
To view or add a comment, sign in
-
-
Day 24/100 – DSA Journey Problem: Intersection of Two Arrays Initially thought of using loops, but that would increase time complexity. Then realized the problem requires only unique common elements, which makes sets a perfect fit. Converted both arrays into sets and used intersection to directly get the result in an efficient way. Key Learning: Choosing the right data structure can simplify the entire problem. #Day24 #100DaysOfCode #DSA #Python #LeetCode #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 72 of #100DaysOfCode Today’s problem: Words Within Two Edits of Dictionary. At first, it looked like a simple string comparison… but checking all possibilities made it tricky. Had to focus on counting differences instead of overcomplicating transformations. 💡 What helped me: Compare character by character → count mismatches Stop early if differences exceed the limit. It’s more about controlling comparisons than trying every change. Slowly getting better at string problems. #DSA #LeetCode #CodingJourney #Python #Strings
To view or add a comment, sign in
-
-
🚀 Tackled the Mean of Range in Array problem today using prefix sums for efficient query handling. Optimized to answer each query in constant time, ensuring platform‑ready performance and hidden test case compliance. #Geekstreak2026 #Geekstreak60 #GFG #Coding #Python #DSA #ProblemSolving #GeeksforGeeks #POTD Problem Link : https://lnkd.in/gE8qbfG6 Solution Link : https://lnkd.in/grPTmTvj
To view or add a comment, sign in
-
-
🚀 Day [22] of #Geekstreak2026 & #Geekstreak60 Today’s Problem of the Day (POTD) was a fun challenge — testing logic, optimization, and edge‑case handling. I implemented a clean solution in Python/C++, ensuring it’s platform‑ready and passes hidden test cases. 💡 Key takeaway: focus on validation and concise design for robust submissions. #Coding #DSA #Python #GeeksforGeeks #POTD #Geekstreak2026 #Geekstreak60 #NPCI #ProblemSolving Problem Link : https://lnkd.in/gV4JCJ3R Solution Link : https://lnkd.in/ghTvacqs
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