Day 16 of My Coding Journey Today I explored two powerful programming concepts: ✔️ Factorial ✔️ Fibonacci Today’s focus was on writing smarter, not longer code. Recursion Got introduced to the concept where a function solves a problem by calling itself. At first it felt confusing, but once I understood the flow, it actually made complex problems simpler. Practiced: Realized how important it is to define a proper base case to avoid infinite loops! Functions with Arguments Started converting basic programs into functions. This helped me understand how to: ✅ Avoid repetition ✅ Improve code readability ✅ Make programs reusable Now instead of hardcoding values, I pass them as arguments — much cleaner! Small concepts like these are changing how I approach problems. It’s less about just writing code, and more about structuring it effectively. 🔥 One step closer to becoming a better developer. #PythonLearning #codegnan #Functions #CodingJourney #100DaysOfCode
Mastering Recursion and Functions in Python
More Relevant Posts
-
Learning from Upsolving a Hard Problem on LeetCode Recently, I upsolved a Hard problem from Biweekly Contest 179 on LeetCode, and it gave me a really valuable insight into Dynamic Programming (DP). Key Takeaway: Sometimes, Tabulation fails while Memoization works better. Here’s why 1. In Tabulation (Bottom-Up), we often compute all possible states of the DP table — even those that are never needed to reach the final answer. 2. This can lead to unnecessary computations and, in some cases, TLE (Time Limit Exceeded). 3. In contrast, Memoization (Top-Down) only computes the states that are actually required, thanks to recursion + caching. 4. This makes it more efficient in problems where the state space is large but only a subset is relevant. My Experience: I initially implemented a Tabulation approach, but it resulted in TLE due to redundant state computations. Switching to Memoization helped me compute only the necessary states — and the solution passed efficiently! Lesson Learned: 1. Don’t blindly choose Tabulation over Memoization. 2. Always analyze the state space and transitions. 3. If many states are irrelevant, Memoization might be the better choice. This was a great reminder that choosing the right approach matters just as much as solving the problem itself. #LeetCode #DynamicProgramming #Memoization #Tabulation #Coding #ProblemSolving #TechLearning #SoftwareEngineering #DSA #Upskilling
To view or add a comment, sign in
-
-
🔥 Day 76 of #100DaysOfCode Solved Climbing Stairs (LeetCode 70) today — a classic Dynamic Programming problem 🚀 At first, it looks simple… but the real learning is in identifying the pattern behind it. 💡 Key Insight: Each step depends on the previous two steps. That’s when it clicked — this is basically a Fibonacci pattern in disguise. Instead of using recursion (which is slow), I used an optimized iterative approach to achieve: ⚡ O(n) time complexity ⚡ O(1) space complexity 📈 Result: ✅ 100% runtime ✅ 90%+ memory efficiency This problem taught me: 👉 Always look for patterns before jumping into coding 👉 Optimization matters as much as correctness Small problems → Big concepts #Day76 #LeetCode #DynamicProgramming #CodingJourney #ProblemSolving #LearnInPublic
To view or add a comment, sign in
-
-
Daily Dose of Surviving in a Programming Contest - sometimes the real optimisation isn’t in the process, it’s in redefining what you track. In competitive programming contests especially on CodeForces, linear combination equations across multiple variables can quickly explode in complexity. But instead of tracking full values, a smarter approach is to manage remainders using modulo—shrinking the problem into something far more controllable. This matters in contests because time isn’t just about coding—it’s about how efficiently you think. This technique is itself called as Frobenius technique or problem. Here’s the thinking flow: • Problem Reading → Identify it as a linear combination / sum constraint problem • Pattern Recognition → Full values aren’t required, only divisibility or remainder matters • Constraints Analysis → Direct DP or brute force grows too large • Approach Selection → Track states using remainders modulo k • Implementation → Transition between states using (current + value) % k • Debugging → Handle cycles, duplicate states, and unreachable remainders What most people miss is this: • They try to compute exact values • When the problem only cares about equivalence classes (remainders) That shift reduces both time complexity and cognitive load under pressure. This maps directly to real systems: • Hashing, partitioning, load balancing → all rely on grouping by equivalence Efficient systems don’t track everything—they track what matters. If you’re plateauing in CP, it’s rarely about syntax—it’s about abstraction. Where I learned this trick? Try solving this question - https://lnkd.in/gpnmPQN4 Are you solving the exact problem—or the minimal version required to get the answer? Let's discuss in comments below. Follow Vishu Kalier for more such Competitive Programming insights. #CompetitiveProgramming #DSA #Algorithms #Modulo #ProblemSolving #Optimization #Coding #SystemDesign #dailydose #cfbr #datastructures #java #math #codeforces #eternal #zomato #VIT
To view or add a comment, sign in
-
-
Free template code for projects 😎 This GitHub profile has repos for various different coding languages. Each one contains example projects on all kinds of topics. Each topic even contains multiple examples, approaching the problem a slightly different way. And it’s all free! Follow for more free coding resources ✅ #code #coding #tech #learntocode #data
To view or add a comment, sign in
-
Most people learn coding the wrong way… 👀 They watch tutorials, feel confident… but freeze when asked to build something from scratch. I just came across a simple challenge: 👉 “Build an ATM machine in 10 minutes using OOP” Sounds easy, right? But here’s the twist — You only get one variable: balance And every deposit/withdraw must update the SAME memory. That’s where real understanding kicks in. 💡 This isn’t about syntax… It’s about how you think like a programmer → Managing state → Writing clean logic → Handling real-world scenarios (like insufficient balance) Honestly, this made me realize: Learning = Watching ❌ Learning = Building under pressure ✅ If you're into coding, try this yourself. No shortcuts. No copying. You’ll instantly know where you stand. Link to know about how I know this:- https://lnkd.in/gQ3364iP #LearnCoding #PythonLearning #OOPConcepts #BuildInPublic #DeveloperMindset #CodingChallenge #ProgrammingLife #TechLearning #StudentDevelopers #UpskillDaily #StopProcrastinating #NoMoreExcuses #BreakThePattern #DontJustWatch #StopWastingTime #RealityCheck #WakeUpCall
To view or add a comment, sign in
-
-
Excited to share our latest video from BK's TechStack: a comprehensive programming refresher! This session is designed to solidify foundational coding knowledge for developers at all stages. We explore fundamental concepts, from the intricate relationship between software and hardware and various software distribution models, to a deep dive into programming paradigms like Procedural, Object-Oriented (OOP), and Functional Programming. We also cover essential program structure, syntax, core concepts, and the development tools that streamline our work. Boost your understanding and navigate the tech landscape with confidence. Join us to reinforce your programming essentials and expand your skillset! What programming concept do you find most crucial for new developers? #ProgrammingRefresher #CodingBasics #SoftwareDevelopment #TechEducation #BKsTechStack
Programming_Basics
https://www.youtube.com/
To view or add a comment, sign in
-
🚀 Introducing CodeFindr A dedicated space to discover, organize, and truly understand code. We will be sharing: - Clean and practical code solutions - Problem-solving approaches - Key concepts from algorithms, data structures, and beyond This is more than a code dump — it’s a structured journey of learning and building. If you're into coding, learning, or improving your problem-solving skills, 👉 Follow the page and be part of the journey. #CodeFindr #Programming #Python
To view or add a comment, sign in
-
Day 30: 90-Day Coding Challenge 🚀 Today was about understanding how sorting techniques can help solve counting problems efficiently. The problem required looking beyond brute force and finding a smarter way to track relationships between elements. Today’s learning highlights: ✅ Using divide and conquer to break the problem into smaller parts ✅ Understanding how merging steps can help count relationships efficiently ✅ Improving time complexity by avoiding unnecessary comparisons This problem showed how modifying a known approach can solve a completely different problem efficiently. Think smarter. Optimize better. Build stronger logic. Day 30 done. On to Day 31. 💻🔥 Anchal Sharma Ikshit .. #90DayCodingChallenge #CodingJourney #ProblemSolving #DivideAndConquer #LearningJourney #Consistency #Growth
To view or add a comment, sign in
-
Variables are the backbone of every program They store data, bring flexibility, and power problem-solving in coding. Mastering variables is the first step toward becoming a great developer. #Programming #CodingBasics #Variables #LearnToCode #SoftwareDevelopment #CodingLife #TechSkills #DeveloperJourney #ComputerScience #ProgrammingConcepts #OibreTechnologies
To view or add a comment, sign in
-
-
Day 34: 90-Day Coding Challenge 🚀 Today was all about exploring constrained combinations and improving backtracking efficiency. The problems required generating valid arrangements while carefully handling duplicates and constraints. Today’s learning highlights: ✅ Using backtracking with pruning to avoid invalid and duplicate configurations ✅ Handling constraints while generating permutations and arrangements ✅ Understanding how to optimize recursive solutions using frequency/count tracking These problems showed how important it is to control the search space while exploring possibilities. Explore smartly. Prune early. Optimize recursion. Day 34 done. On to Day 35. 💻🔥 Anchal Sharma Ikshit .. #90DayCodingChallenge #CodingJourney #ProblemSolving #Backtracking #Recursion #LearningJourney #Consistency #Growth
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