🚀 Day 5 — DSA with Python Solved the classic “Product of Array Except Self” problem today. This one introduced me to an important concept: 👉 Precomputation (Prefix & Suffix Pattern) Instead of recalculating products again and again, I learned how to: • Store prefix products (left side) • Store suffix products (right side) • Combine them to get the result efficiently 💡 Key Learning: Optimizing brute-force solutions using precomputation can significantly reduce time complexity. ⚡ What challenged me: Understanding how to manage two passes (left → right and right → left) without using extra space initially felt confusing — but breaking it step by step helped. 📈 Growth Insight: DSA is less about memorizing solutions and more about recognizing patterns like this one. On to Day 6 🔥 #DSA #Python #CodingJourney #ProblemSolving #100DaysOfCode
Product of Array Except Self DSA with Python
More Relevant Posts
-
🚀 Day 2 of #100DaysOfCode Today I learned how to check whether a number is a Palindrome using Python 🐍 🔍 Problem: A number is called a palindrome if it reads the same forward and backward (like 121, 1331). 💡 Approach: Reverse the number using a loop Compare it with the original number 🐍 Code: num = int(input("Enter a number: ")) original = num reverse = 0 while num > 0: digit = num % 10 reverse = reverse * 10 + digit num = num // 10 if original == reverse: print("Palindrome Number") else: print("Not a Palindrome Number") 📌 Key Learning: Learned how loops and basic logic can solve interesting problems. 💬 Next: Armstrong Number 🔥 #Python #Coding #100DaysOfCode #Learning #CSE
To view or add a comment, sign in
-
-
Day 23/100 – DSA Journey Problem: Remove Duplicates from Sorted Linked List A sorted linked list keeps duplicates next to each other, which makes it easy to remove them in one pass. Used simple traversal and pointer updates to skip duplicate nodes without extra space. Key Learning: Always use the structure of the data to simplify the solution. #Day23 #100DaysOfCode #DSA #LinkedList #Python #LeetCode
To view or add a comment, sign in
-
-
While learning LangGraph, one small Python concept suddenly became much more important to me: TypedDict. At first, I thought it was just “type annotations for dictionaries.” Useful, sure—but nothing special. Then I started thinking about state. When multiple nodes in a workflow keep reading and updating shared data, an unstructured dict becomes chaos very quickly. - Missing keys. - Unexpected values. - Confusing debugging. TypedDict solves that by forcing structure into state. That was my takeaway: - Sometimes tools that look “optional” become essential once systems start growing. #Python #BackendDevelopment #LangGraph #AIEngineering #BuildInPublic
To view or add a comment, sign in
-
Day 117 Same pattern, one important tweak. #Day117 🧩 90. Subsets II How today went: • Same base as Subsets • First step: sort the array • While iterating, skip duplicates to avoid repeating subsets • Use the same pattern: append → recurse → pop What I learned: It’s not a new problem — it’s the same pattern with a duplicate filter. Small condition. Big impact. Backtracking is starting to feel predictable. #LeetCode #DSA #Python #Backtracking #Recursion #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
Day 106 Some problems feel simple when the pattern clicks. #Day106 🧩 17. Letter Combinations of a Phone Number How today went: • Used a digit → letters map • Built combinations using backtracking • Maintained a string path at each step • One recursive call per choice — no need for complex state handling What I realized: Once you understand the pattern: → choose a letter → move to next digit → build the path Backtracking becomes very natural. Simple problem, but great for building confidence. #LeetCode #DSA #Python #Backtracking #Recursion #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
Day 119 Same problem family, new constraint — but now it feels easier. #Day119 🧩 40. Combination Sum II How today went: • Very similar to Combination Sum • First step: sort the array • Move to i + 1 (each element used once) • Skip duplicates to avoid repeating combinations Key idea: 👉 No reuse of same element 👉 Handle duplicates carefully What I realized: Once you understand the base pattern, variants like this become much easier. Backtracking is starting to feel natural now. #LeetCode #DSA #Python #Backtracking #Recursion #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
For years, we accepted the GIL as a tax on Python performance. But with the "No-GIL" movement officially maturing in Python 3.14 and 3.15, we are finally unlocking true multi-core parallelism. It is a massive shift in how we think about CPU-bound tasks. We no longer have to default to multiprocessing and the memory overhead that comes with it just to bypass the lock. Seeing a single Python process actually saturate multiple cores without the "ceremony" of older workarounds feels like a new era for the language. The performance gap with Go or Rust is narrowing where it matters most, making Python an even stronger contender for high-throughput backends. Are you already experimenting with free-threaded builds for your heavy processing, or are you waiting for library support to catch up? #Python315 #PerformanceEngineering #BackendDevelopment #NoGIL #ProgrammingTrends
To view or add a comment, sign in
-
Can we actually enjoy studying? With the right approach, absolutely! 💡 I’ve been using a mix of my own notes and Generative AI to create visual summaries of Python basics. I found that using these visual "maps" makes it so much easier to remember terms properly for a long period of time. Whether you are a beginner or just need a quick revision guide, this 1-page summary is a game-changer for staying sharp. Check out my Python Basic "Cheat Sheet" below! 👇 #Python #GenAI #Programming #RevisionTips #CareerGrowth #DataScience #DataAnalytics
To view or add a comment, sign in
-
-
🚀 Day 43 – LeetCode Journey Today’s problem: Minimum Depth of Binary Tree ✔️ Solved using recursion (DFS) ✔️ Carefully handled edge cases (null child nodes) ✔️ Calculated minimum depth correctly for uneven trees 💡 Key Insight: The minimum depth is the shortest path from the root node to a leaf node. We must handle cases where one subtree is missing — simply taking "min()" is not enough without checking null nodes. This problem improved my understanding of tree traversal and edge case handling in recursion 🌳 Learning to think deeper with trees every day 🔥💪 #LeetCode #Day43 #BinaryTree #DFS #Recursion #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 14 of My Python + DSA Journey Tried a different approach today and optimized my solution 👇 ✅ Majority Element II (#229) 💡 Majority Element II Find elements appearing more than n/3 times 🔍 Approach: Used Boyer-Moore Voting Algorithm → tracked candidates and validated counts ⏱ O(n) time | O(1) space 🔥 What I learned today: • Same problem can have multiple approaches • Optimization reduces space from O(n) → O(1) • Smart algorithms > brute-force thinking Learning to not just solve… but solve better ⚡ #Day14 #LeetCode #Python #DSA #CodingJourney #100DaysOfCode
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