🍂Day 61 LeetCode: Evaluate Reverse Polish Notation (150) Approach: Used a stack to evaluate postfix expressions by pushing operands and applying operators as they appear. ✨ Learned how stack-based evaluation simplifies expression parsing — a great problem to strengthen logic and operator handling! 📈 Improved understanding of stacks, expression evaluation, and efficient parsing techniques in C++. #LeetCode #100DaysOfCode #DSA #Stack #Strings #ProblemSolving #CodingJourney #CodeEveryday
"Day 61: Solved LeetCode 150 with Stack-Based Evaluation"
More Relevant Posts
-
🍁Day 68 LeetCode: Reverse Linked List (206) Approach: Reversed the linked list iteratively by updating pointers step-by-step while traversing through the list. ✨ Learned how pointer manipulation can transform linked list structures efficiently — a fundamental and must-know problem! 📈 Improved understanding of linked lists, pointer handling, and iterative logic in C++. #LeetCode #100DaysOfCode #DSA #LinkedList #Pointers #ProblemSolving #CodingJourney #CodeEveryday
To view or add a comment, sign in
-
-
🌿Day 71 LeetCode: Remove Nth Node From End of List (19) Approach: Used the two-pointer technique — moved one pointer n steps ahead, then traversed both to locate and remove the target node efficiently. ✨ Learned how the two-pointer approach simplifies linked list problems and improves traversal logic! 📈 Improved understanding of pointer manipulation, edge case handling, and linked list traversal in C++. #LeetCode #100DaysOfCode #DSA #LinkedList #TwoPointers #ProblemSolving #CodingJourney #CodeEveryday
To view or add a comment, sign in
-
-
🌟Day 59 LeetCode: Subsets (78) Approach: Used backtracking to generate all possible subsets of a given array by exploring inclusion and exclusion of each element. ✨ Learned how recursion and backtracking can systematically explore all combinations — a classic and insightful problem! 📈 Improved understanding of recursion tree logic, subset generation, and backtracking techniques in C++. #LeetCode #100DaysOfCode #DSA #Backtracking #Recursion #ProblemSolving #CodingJourney #CodeEveryday
To view or add a comment, sign in
-
-
🪷Day 69 LeetCode: Merge Two Sorted Lists (21) Approach: Merged two sorted linked lists by comparing nodes one by one and building a new sorted list using pointer manipulation. ✨ Learned how to handle linked list traversal and merging efficiently — a classic problem to strengthen pointer logic! 📈 Improved understanding of linked list operations, conditional traversal, and iterative merging in C++. #LeetCode #100DaysOfCode #DSA #LinkedList #Pointers #ProblemSolving #CodingJourney #CodeEveryday
To view or add a comment, sign in
-
-
✨Day 67 LeetCode: Letter Combinations of a Phone Number (17) Approach: Used backtracking to generate all possible letter combinations mapped from digits, following the classic phone keypad pattern. ✨ Learned how recursion and backtracking can explore all possible paths efficiently — a great exercise in mapping and combinatorial logic! 📈 Improved understanding of recursion, string building, and backtracking patterns in C++. #LeetCode #100DaysOfCode #DSA #Backtracking #Strings #ProblemSolving #CodingJourney #CodeEveryday
To view or add a comment, sign in
-
-
💫Day 72 LeetCode: Linked List Cycle (141) Approach: Used an unordered_set to store visited nodes while traversing the list. If a node is already present in the set, a cycle exists. ✨ Learned how hashing helps in detecting cycles efficiently without modifying the linked list — a clean and intuitive solution! 📈 Improved understanding of hash-based detection, pointer traversal, and cycle identification in C++. #LeetCode #100DaysOfCode #DSA #LinkedList #Hashing #ProblemSolving #CodingJourney #CodeEveryday
To view or add a comment, sign in
-
-
🚀 Day 106 of #gfg160 – 160 Days of Coding Challenges ✅ Problem Solved: Postfix Evaluation (Reverse Polish Notation) 🟡 Difficulty: Medium 🧠 Approach: Used a stack-based evaluation method to compute the result of a postfix (RPN) expression. 🔹 Traverse each token in the array: If the token is a number, push it onto the stack. If the token is an operator (+, -, *, /, ^), pop the top two values, apply the operator, and push the result back. Handled division using floor division, ensuring correct behavior for negative values (as required by the problem). ✅ Supports operators: +, -, *, /, ^ ✅ Works for multi-digit numbers and negative integer results ⚡ Complexity: 🕒 Time Complexity: O(N) → Each token is processed exactly once 💾 Space Complexity: O(N) → Stack may store operands during evaluation 📊 Result: ✔️ 1120 / 1120 test cases passed 📉 Accuracy: 100% Evaluating postfix expressions is a powerful problem that highlights how Stacks make expression parsing efficient and clean! 💪 #Day106 #gfg160 #GeeksforGeeks #Java #Stack #PostfixEvaluation #ReversePolishNotation #DSA #ProblemSolving #CodingChallenge #LearnByDoing #160DaysOfCode #DailyDSA #SoftwareEngineering #TechJourney #Consistency #StJosephsInstituteOfTechnology
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
-
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