Implemented a menu-driven Queue using C 💻 Built a simple program demonstrating core queue operations: • Enqueue (Insertion) • Dequeue (Deletion) • Display Worked with front and rear pointers to manage the queue and handled edge cases like overflow and underflow. Attached a short video demo showing the program in action 🎥 This helped reinforce my understanding of data structures and modular coding in C. Next step: implementing a circular queue for better efficiency. #CProgramming #DataStructures #Queue #CodingPractice #LearningByDoing
More Relevant Posts
-
Here’s the fix: The code used different variable names. Fixing that and keeping the print inside the loop makes it run perfectly. #DebuggingSkills #PythonForBeginners #STEMEducation #CodingChallenge #LearnCoding
To view or add a comment, sign in
-
-
Climbing Stairs Using Dynamic Programming Day 13 👈 💡 Key Insight: This problem follows a Fibonacci pattern: Ways(n) = Ways(n-1) + Ways(n-2) 🔁 Optimization: Used memoization (top-down DP) to store previously computed results Avoided recalculating the same subproblems ⚡ Time Complexity improved: From O(2ⁿ) → O(n) #DSA #DynamicProgramming #Memoization #Algorithms #CodingJourney #LeetCode #ProblemSolving #InterviewPreparation #SoftwareEngineer #LearningInPublic
To view or add a comment, sign in
-
-
Solved today’s LeetCode Hard: 3655. XOR After Range Multiplication Queries II ✅ At first, it looked like a direct simulation problem. For each query: • start from l • jump by k • multiply by v Simple idea. But with n = 1e5 and queries = 1e5, that approach breaks very fast. So the real challenge was not implementing the updates… It was figuring out how to avoid doing them one by one. What I learned from this problem: The important observation was that each query updates indices in an arithmetic progression: l, l+k, l+2k ... That led to a much better approach: • Large k → process directly • Small k → group and batch efficiently That small observation completely changed the problem. What I liked about this one is that it didn’t need some magical trick. It just needed the right way of looking at the updates. Sometimes hard problems are less about advanced coding and more about seeing the structure early. Good problem. Nice learning. 🚀 Problem Link : https://lnkd.in/dHBq8t5z Solution : https://lnkd.in/dqMAvJca #LeetCode #Cpp #ProblemSolving #CodingJourney #CompetitiveProgramming
To view or add a comment, sign in
-
-
Day 18/100 💻 Today’s challenge was all about optimizing finger movement on a keyboard using dynamic programming. The goal: minimize total distance while typing a word with two fingers. 🧠 Key takeaway: Instead of thinking greedily, we track both finger positions at every step and choose the move that gives the minimum cumulative cost. This problem really highlights how DP can turn an exponential decision space into something efficient. ⚡ Learned: State design is everything in DP Reusing previous computations avoids redundant work Sometimes “free starting positions” can simplify complexity 🚀 Progress: 18 days down, 82 to go! #100DaysOfCode #DataStructures #DynamicProgramming #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
💡 DP (Dynamic Programming) becomes simple with the right problem — Counting Bits (LeetCode 338) 👉 dp is using previous results to compute new results Instead of recomputing, just reuse: `bits[i] = bits[i >> 1] + (i & 1)` Same patterns. Less work. Faster solution. #DynamicProgramming #LeetCode #DSA #CodingInterview #ProblemSolving #BitManipulation
To view or add a comment, sign in
-
🚀 Day 10 of Coding Solved Problem #844 – Backspace String Compare 💡 🔍 Problem Statement: Given two strings s and t, return true if they are equal when both are typed into empty text editors. # means a backspace character. 🧠 Key Learning: ✔ Mastered two-pointer approach from the end ✔ Learned how to handle backspace operations efficiently ✔ Avoided extra space by not building new strings ⚡ Approach: 👉 Traverse both strings from right to left 👉 Use counters to skip characters affected by # 👉 Compare valid characters one by one 👉 Return false if mismatch occurs 💻 Tech Stack: C++ | STL ✅ Result: ✔ Accepted ✔️ ✔ Optimized with O(n) time and O(1) space 🔥 Another step forward in consistency and problem-solving! #Day10 #LeetCode #DSA #CodingJourney #CPP #ProblemSolving
To view or add a comment, sign in
-
-
𝐃𝐚𝐲 𝟗𝟐/𝟏𝟎𝟎 – Competitive Programming (CodeForces) Solved: 977C - Less or Equal, 1872D - Plus Minus Permutation --977C was simple greedy: sort the array and check the k-th position carefully to satisfy the condition. --1872D was more math + greedy: instead of building permutation, count multiples using LCM, assign largest values to x-multiples and smallest to y-multiples, then compute score. #Codeforces #CompetitiveProgramming #100DaysOfCode #Greedy #Math #NumberTheory #ProblemSolving #DSA #Cpp #Algorithms
To view or add a comment, sign in
-
-
Day 42: 90-Day Coding Challenge 🚀 Today was about combining multiple patterns - from sequence generation to ordering and counting techniques. Focused on recognizing the right approach for each problem Today’s learning highlights: ✅ Using multi-pointer & DP techniques for structured sequence generation ✅ Applying binary search on answer + counting logic for distance-based problems ✅ Understanding merge sort-based counting & in-place partitioning for array transformations Today was a mix of patterns - but the real skill was knowing which tool to use and when. Pick the pattern. Apply with clarity. Refine with practice. Day 42 done. On to Day 43. 💻🔥 Anchal Sharma Ikshit .. #90DayCodingChallenge #CodingJourney #ProblemSolving #Arrays #Sorting #BinarySearch #DynamicProgramming #LearningJourney #Consistency #Growth
To view or add a comment, sign in
-
🚀 Day 11 of Coding Solved Problem #1047 – Remove All Adjacent Duplicates in String 💡 🔍 Problem Statement: Given a string, repeatedly remove adjacent duplicate characters until no duplicates remain. Return the final string. 🧠 Key Learning: Used Stack Data Structure to efficiently track characters Learned how to simulate removal of adjacent duplicates Understood how LIFO helps in matching recent characters ⚡ Approach: Traverse the string If current character == top of stack → pop Else → push into stack Convert stack back to string for final answer ⏱️ Complexity: Time: O(n) Space: O(n) 💻 Tech: C++ | DSA Consistency is the key 🔥 #Day11 #CodingJourney #DSA #LeetCode #Cpp #ProblemSolving
To view or add a comment, sign in
-
-
Project #2 — Temperature Converter in C++ As part of my learning journey in C++, I built a (console-based Temperature Converter) focused on improving code structure, modularity, and user input handling. This project helped me move further from just writing code to designing cleaner and more maintainable programs. What I Focused On - Using (enum) to represent temperature units clearly - Structuring data using (struct) - Writing modular and reusable functions - Implementing strong input validation - Improving overall code readability Features - Convert between: - Celsius ↔ Fahrenheit - Celsius ↔ Kelvin - Fahrenheit ↔ Kelvin - Clean formatted output - Continuous conversion loop - Input validation for better user experience What I Improved From My Previous Project - Better separation of logic (input / processing / output) - More consistent function design - Cleaner flow and user interaction - Improved handling of invalid inputs Demo video below GitHub Repository: https://lnkd.in/eQrJH7tq Next Step Refactoring my projects into (Object-Oriented Programming (OOP)) and building more advanced applications. #cpp #programming #softwaredevelopment #coding #learning #github #beginners #100DaysOfCode #ProgrammingAdvices
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
This is insightful. It shows how important it is to understand the underlying logic, not just the syntax.