Day 88 of #100DaysOfCode Today’s problem: Final Value of Variable After Performing Operations (LeetCode 2011) 🧠 Concept: Simple logic using loops and conditionals in C++ 💡 Learned how to efficiently handle string operations and use ternary operators for concise logic. Each small problem strengthens logical thinking — one step closer to mastering programming fundamentals! 🚀 #100DaysOfCode #LeetCode #Cplusplus #ProblemSolving #CodingChallenge
Solved LeetCode 2011 with C++ loops and conditionals
More Relevant Posts
-
🚀 Day 98/100 – Minimum Number of Increments on Subarrays to Form a Target Array (LeetCode #1526) Today’s challenge was all about optimizing 🔢 subarray operations. I learned how to minimize the number of increments needed to transform an initial array of zeros into a target array. 💡 Key takeaway: Focus on the difference between consecutive elements — only positive jumps matter! 💻 Language: C++ ⚙️ Concepts: Arrays | Greedy Approach | Optimization ✅ Slowly closing in on 💯 days of consistent coding! #100DaysOfCode #LeetCode #CPlusPlus #CodingChallenge #ProblemSolving #DSA #KeepCoding
To view or add a comment, sign in
-
-
🚀LeetCode #5 – Longest Palindromic Substring (C++ Solution) Just solved LeetCode Problem #5 — one of those classic challenges that really tests your understanding of string manipulation and dynamic programming. This problem made me slow down and think carefully about how to expand around centers efficiently and optimize without brute force. It’s a great example of how small improvements in logic can drastically change performance. 🧠 Concept: Find the longest substring that reads the same forward and backward. Approach used: Expand Around Center — checking every possible center in O(n²) time but with constant space. 💻 Tech Stack: C++ ⚙️ Focus: Optimization, logic clarity, and clean code structure. Every problem like this strengthens how I think about data patterns — and that’s exactly the kind of mindset I bring into real game logic and system design. #LeetCode #Cplusplus #Coding #ProblemSolving #GameDev #Programming
To view or add a comment, sign in
-
-
🎯 LeetCode Day 46 – Unique Paths (Dynamic Programming) 🚀 Today’s challenge was about finding the number of unique paths in an m x n grid — you can only move right or down. 💡 I optimized it using a 1D Dynamic Programming approach, reducing space complexity from O(m*n) to O(n). The idea: Each cell = sum of paths from top and left. By updating rows iteratively, we achieve efficiency and elegance. ⚡ Result: ✅ All 64 test cases passed ⏱ Runtime: 0 ms (beats 100%) 💾 Memory: 40.25 MB (beats 89.65%) 📈 Learning: Sometimes, optimizing space is as impactful as optimizing time! #LeetCode #Day46 #DynamicProgramming #Java #CodingJourney #ProblemSolving #50DaysOfCode
To view or add a comment, sign in
-
-
🎯 LeetCode Day 46 – Unique Paths (Dynamic Programming) 🚀 Today’s challenge was about finding the number of unique paths in an m x n grid — you can only move right or down. 💡 I optimized it using a 1D Dynamic Programming approach, reducing space complexity from O(m*n) to O(n). The idea: Each cell = sum of paths from top and left. By updating rows iteratively, we achieve efficiency and elegance. ⚡ Result: ✅ All 64 test cases passed ⏱ Runtime: 0 ms (beats 100%) 💾 Memory: 40.25 MB (beats 89.65%) 📈 Learning: Sometimes, optimizing space is as impactful as optimizing time! #LeetCode #Day46 #DynamicProgramming #Java #CodingJourney #ProblemSolving #50DaysOfCode
To view or add a comment, sign in
-
-
Typedef vs Macro, Same language, different powers! One simplifies your #code, the other automates it. But which one truly wins in C programming? 🤔 👉 Dive in to see the real difference between these two coding heroes! #cprogramming #embeddedsystems #codingtips #learnwithemertxe
To view or add a comment, sign in
-
🧠 LeetCode #1526 — Minimum Number of Increments on Subarrays to Form a Target Array Difficulty: Hard 🔴 Language: C++ 💻 💡 Approach: Instead of simulating subarray increments, observe that each time the array value surpasses the previous one, a corresponding operation is required. To calculate the total operations needed, sum all positive variances between adjacent elements along with the initial element. ✅ Time Complexity: O(n) ✅ Space Complexity: O(1) 📈 Result: Accepted (0 ms runtime) 💬 Simple logic, efficient solution! 🔥 Keep solving, keep growing 💪 #LeetCode #CPlusPlus #DSA #Coding #ProblemSolving #HardProblems #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 71 of My LeetCode Journey 🚀 Problem : Valid Parentheses Today I solved Valid Parentheses, a classic stack-based problem that checks whether a sequence of brackets is balanced. 🔍 Key Idea: Use a Stack to track opening brackets. Push ( { [ onto the stack When you see a closing bracket, check if it matches the top of the stack If it doesn't match, the string is invalid In the end, stack must be empty 🧠 Concepts Practiced: Stack operations String traversal Matching bracket logic Clean conditional validation 💡 Learning: This problem reinforces how stacks are perfect for handling “last opened, first closed” scenarios. It’s simple but builds strong fundamentals for parsing and expression evaluation problems. #100DaysOfCode #LeetCode #Java #DSA #CodingJourney #Stack #ProblemSolving #LearningEveryday #TechCareer #Programmer
To view or add a comment, sign in
-
-
Matrix Rotation (Inspired by LeetCode Problem 48 - Rotate Image) Recently, I worked on a mini project based on the LeetCode problem “Rotate Image”, which involves rotating a matrix representation of an image. Through this project, I explored how pixels and matrices interact while implementing the logic behind image rotation. I developed the project using Java Swing for the user interface, which helped me visualize the matrix rotation process and make the learning more interactive. Even though it’s a core array concept, this experience gave me a clear understanding of how DSA principles can be applied efficiently in real-world software projects — especially in optimizing logic and performance. I’m still learning and experimenting with more DSA concepts, building mini projects to practically apply them and understand how they fit into the software development life cycle (SDLC). #DSA #Java #JavaSwing #LeetCode #LearningJourney #ProblemSolving #SoftwareDevelopment #MatrixRotation
To view or add a comment, sign in
-
🚀 Day 56 – Object-Oriented Programming in C++ Today I explored one of the most powerful paradigms in programming — Object-Oriented Programming (OOP) in C++. 💡 🔹 Key Learnings: Understood the 4 core pillars of OOP: Encapsulation, Inheritance, Polymorphism, and Abstraction. Learned how to define classes and objects effectively with constructors, destructors, and access specifiers (public, private, protected). Explored inheritance to reuse and extend existing functionality. Implemented polymorphism using virtual functions for dynamic behavior. Understood how abstraction helps hide internal complexity and focus on essential features. 🧩 This lecture helped me realize how OOP makes code modular, reusable, and easier to maintain — a key skill for building scalable software systems. #100DaysOfDSA #Day56 #Cplusplus #OOP #ProgrammingJourney #LearningNeverStops 🚀
To view or add a comment, sign in
-
💡 C vs C++ — Understanding the Core Difference As developers, we often start our journey with C, the foundation of modern programming — a procedural language focused on functions and structured logic. Then we move to C++, an evolution that introduces Object-Oriented Programming (OOP) — bringing classes, objects, and reusability into play. Both languages are powerful in their own way: ✅ C – Fast, low-level, close to hardware ✅ C++ – Flexible, modular, and object-oriented Understanding their differences helps us appreciate how programming has evolved — from procedural thinking to object-oriented design. 🚀 #C #CPlusPlus #Programming #Developers #Coding #Learning #SoftwareDevelopment #OOP #TechEducation
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