💯 Daily Problem Solving – LeetCode Practice Today I solved 5 problems on LeetCode to improve my problem-solving and data structure skills. Problems solved: • 977 – Squares of a Sorted Array • 167 – Two Sum II (Input Array Is Sorted) • 319 – Bulb Switcher • 747 – Largest Number At Least Twice of Others • 11 – Container With Most Water While solving these problems, I practiced concepts like Two Pointers, Math Logic, and Array Traversal. Consistent practice on platforms like LeetCode helps improve logical thinking and coding efficiency for technical interviews. #LeetCode #ProblemSolving #Java #DSA #CodingPractice #SoftwareEngineering
Improving Problem-Solving Skills with LeetCode Practice
More Relevant Posts
-
🔥 Day 31/100 – DSA Problem Solving 📌 Problem: 412. Fizz Buzz (LeetCode) Today’s problem looks simple, but it really tests your logic building and attention to detail. 💡 My Approach: I used a loop from 1 to n For each number: If divisible by both 3 & 5 → "FizzBuzz" If divisible by 3 → "Fizz" If divisible by 5 → "Buzz" Otherwise → convert number to string 🧠 What I Learned Today: ✅ Importance of using the correct variable inside loops ✅ Order of conditions matters (3 & 5 first) ✅ Writing clean and readable logic ✅ Even easy problems can teach debugging skills 🚀 Key Takeaway: Don’t underestimate easy problems — they help build strong fundamentals and improve problem-solving thinking. 💻 Code Concept: Used simple loop + conditional statements + list to store results. #Day31 #100DaysOfCode #DSA #LeetCode #Java #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
Day 80 of DSA Problem Solving Solved LeetCode 876 — Middle of the Linked List 🔥 Today’s problem was all about linked list traversal and using the two-pointer technique efficiently. 🚀 Problem Idea We are given the head of a singly linked list, and the task is to return the middle node of the linked list. If there are two middle nodes, we return the second middle node. 💡 Key Learning The main insight was: If we use two pointers, one moving 1 step at a time and the other moving 2 steps at a time, then by the time the fast pointer reaches the end of the list, the slow pointer will be standing at the middle node. So instead of counting the total number of nodes first, we can directly find the middle in just one traversal. 🧠 Concepts Practiced Two Pointer Technique Linked List Traversal Fast and Slow Pointer Single Pass Traversal Pointer Movement Logic ⏱ Time Complexity Time: O(n) Space: O(1) 📈 Real Journey Behind the Solution At first, this problem looks very basic, and the brute force idea of counting nodes and then reaching the middle can come to mind quickly. But this question teaches a much smarter and cleaner approach using slow and fast pointers. This problem helped me strengthen my understanding of linked list fundamentals and pointer movement, which are extremely important in coding interviews. Every day, I’m realizing that even easy problems can teach very powerful concepts when solved with the right approach. #Day80 #DSA #LeetCode #Java #LinkedList #TwoPointers #CodingJourney #ProblemSolving #CodingDaily
To view or add a comment, sign in
-
-
🚀 Day 14 of My LeetCode Journey Today I solved Merge Intervals (LeetCode 56). Problem: Given a collection of intervals, merge all overlapping intervals and return the non-overlapping intervals that cover all the intervals. Approach: I used a Sorting + Linear Scan technique. Steps: • First sort the intervals based on their start time • Compare each interval with the last merged interval • If they overlap, merge them by updating the end value • Otherwise, add the interval to the result list Key Concepts: • Sorting • Interval manipulation • Greedy approach Time Complexity: O(n log n) Space Complexity: O(n) This is a classic interval problem frequently asked in coding interviews. #leetcode #datastructures #algorithms #java #codinginterview #softwareengineering
To view or add a comment, sign in
-
-
🚀 Day 27/60 — LeetCode Discipline Problem Solved: Length of Last Word Difficulty: Easy Today’s problem looked simple, yet it emphasized a subtle but important skill — handling edge cases cleanly. The goal was to find the length of the last word in a string, ignoring any trailing spaces. Instead of splitting the string or using extra space, the solution efficiently traverses from the end, skipping unnecessary characters and counting only what truly matters. It’s a reminder that strong coding is not always about complexity — sometimes, it’s about precision and clarity in small details. 💡 Focus Areas: • Practiced string traversal from end • Improved handling of trailing spaces • Reinforced clean and efficient logic • Avoided unnecessary extra space usage • Strengthened edge-case thinking ⚡ Performance Highlight: Achieved 0 ms runtime (100% performance). Small problems, when approached with discipline, sharpen the instincts that solve big ones. #LeetCode #60DaysOfCode #100DaysOfCode #DSA #Strings #Algorithms #ProblemSolving #CodingJourney #SoftwareEngineering #Java #Developers #Consistency #TechJourney #LearnToCode
To view or add a comment, sign in
-
-
🚀 Day 29/60 — LeetCode Discipline Problem Solved: Longest Common Prefix Difficulty: Easy Today’s problem focused on identifying the longest common starting pattern across multiple strings — a classic exercise in string comparison and iteration. The approach involved checking characters position by position across all strings until a mismatch is found. This reinforces how simple iterative logic can elegantly solve problems involving multiple inputs. It’s a reminder that sometimes, clarity in approach matters more than complexity in code. 💡 Focus Areas: • Strengthened string traversal techniques • Practiced comparing multiple inputs efficiently • Improved understanding of edge cases (empty strings, mismatch handling) • Reinforced early stopping conditions for optimization • Focused on clean and readable logic ⚡ Performance Highlight: Achieved efficient runtime with minimal overhead. Finding common ground across multiple inputs is not just a coding skill — it’s a pattern recognition mindset. #LeetCode #60DaysOfCode #100DaysOfCode #DSA #Strings #Algorithms #ProblemSolving #CodingJourney #SoftwareEngineering #Java #Developers #Consistency #TechGrowth #LearnToCode
To view or add a comment, sign in
-
-
One interesting thing I’ve noticed while doing #100DaysOfCode and solving problems on LeetCode: At first, every problem looks completely different. But after solving a few, you start realizing many of them are built on the same core patterns: • Binary Search • Two Pointers • Sliding Window • Greedy • Hashing The real challenge isn’t just coding the solution — it’s recognizing the pattern quickly. Once the pattern clicks, the problem suddenly becomes much easier. Curious to know from other developers here 👇 Which LeetCode problem or concept made an algorithmic pattern “click” for you? #100DaysOfCode #LeetCode #DSA #Algorithms #CodingJourney #ProblemSolving #Java #SoftwareEngineering #TechLearning
To view or add a comment, sign in
-
Day 80 - LeetCode Journey 🚀 Solved LeetCode 876: Middle of the Linked List (Easy) — a classic problem that introduces one of the most powerful patterns in linked lists. At first, finding the middle seems straightforward. But doing it efficiently in a single pass is where the real insight comes in. 💡 Core Idea (Slow & Fast Pointer Technique): Initialize two pointers: slow and fast Move slow by 1 step and fast by 2 steps When fast reaches the end, slow will be at the middle If there are two middle nodes, this approach naturally returns the second one. 🤯 Why it works? Because the fast pointer covers double the distance of the slow pointer, so when it finishes traversing the list, the slow pointer is exactly halfway. ⚡ Key Learning Points: • Efficient single-pass traversal • Mastering the slow-fast pointer pattern • Handling even and odd length lists • Achieving O(n) time and O(1) space • Building intuition for pointer-based problems This is a foundational pattern used in many advanced problems. Also, this pattern connects with: Linked List Cycle detection Palindrome Linked List Reorder List Finding intersection of two linked lists ✅ Stronger grasp of two-pointer technique ✅ Better problem-solving efficiency ✅ Cleaner and optimized linked list logic Simple problem, powerful pattern — this is how concepts build up 🚀 #LeetCode #DSA #Java #LinkedList #TwoPointers #Algorithms #ProblemSolving #CodingJourney #Consistency #100DaysOfCode #InterviewPreparation #DeveloperGrowth #KeepCoding
To view or add a comment, sign in
-
-
Day 53 :- 𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝗠𝗮𝘁𝗰𝗵𝗶𝗻𝗴 𝗶𝗻 𝗦𝘁𝗿𝗶𝗻𝗴𝘀: 𝗜𝘀𝗼𝗺𝗼𝗿𝗽𝗵𝗶𝗰 𝗦𝘁𝗿𝗶𝗻𝗴𝘀 🔤🔁 Today’s DSA session was about understanding character mapping and pattern consistency using LeetCode 205: Isomorphic Strings. This problem is a great way to strengthen understanding of hashing + mapping patterns in strings. 🔹 𝗧𝗵𝗲 𝗖𝗵𝗮𝗹𝗹𝗲𝗻𝗴 Given two strings s and t, determine if they are isomorphic. 👉 Two strings are isomorphic if characters in s can be replaced to get t, while maintaining order. 👉 No two characters can map to the same character (one-to-one mapping). 🔹 𝗧𝗵𝗲 𝗞𝗲𝘆 𝗜𝗻𝘀𝗶𝗴𝗵𝘁 💡 This problem combines: • Character mapping • Tracking last seen positions 👉 Instead of explicitly storing mappings, we track last occurrence index of characters. 🔹 𝗖𝗼𝗿𝗲 𝗟𝗼𝗴𝗶𝗰 ✔️ If lengths are different → return false ✔️ Use two arrays to track last seen positions: • lastS for string s • lastT for string t ✔️ For each index i: • If last occurrence of s[i] ≠ last occurrence of t[i] → not isomorphic • Update both with i + 1 👉 Using i + 1 avoids confusion with default value 0 🔹 𝗪𝗵𝘆 𝗧𝗵𝗶𝘀 𝗪𝗼𝗿𝗸𝘀 👉 Ensures consistent mapping pattern 👉 If two characters behaved differently before → mismatch detected 👉 No need for complex hash maps 🔹 𝗘𝗳𝗳𝗶𝗰𝗶𝗲𝗻𝗰𝘆 ⚡ • Time Complexity → O(n) • Space Complexity → O(1) (fixed size arrays) 🔹 𝗞𝗲𝘆 𝗧𝗮𝗸𝗲𝗮𝘄𝗮𝘆 💡 👉 Pattern problems can often be solved using last seen indices 👉 Always think of simpler representations before jumping to hash maps 👉 Consistency in mapping is more important than actual values 🙏 Huge thanks to my mentors Anchal Sharma and Ikshit .. for guiding me in recognizing patterns in string problems. This approach makes many problems much simpler! #DSA #Java #100DaysOfCode #Strings #Hashing #ProblemSolving #Mentorship #LeetCode #SoftwareEngineering #CodingJourney 🚀
To view or add a comment, sign in
-
-
🚀100 Days of Code Day-20 LeetCode Practice – Valid Parentheses Today, I solved the "Valid Parentheses" problem, which is a great example of using the Stack data structure effectively. 🔍 Problem Summary: Given a string containing brackets ()[]{}, the task is to check whether the brackets are valid based on correct order and matching pairs. 💡 Approach: I used a Stack to keep track of opening brackets and ensured each closing bracket matches the most recent opening one. ⚡ Key Learnings: Understanding how LIFO (Last In First Out) works in real problems Importance of handling edge cases like empty stack Writing clean and optimized logic using data structures 📌 Consistency in problem-solving is helping me strengthen my DSA skills step by step! #LeetCode #DSA #Java #ProblemSolving #CodingJourney #Stack #Learning
To view or add a comment, sign in
-
-
🚀Day 31 of LeetCode LeetCode 206: Reverse Linked List | Mastering Pointers Like a Pro! One of the most fundamental (and frequently asked) problems in Data Structures — reversing a linked list 🔁 🔹 Problem: Given the head of a singly linked list, reverse it and return the new head. 🔹 Example: Input: 1 → 2 → 3 → 4 → 5 Output: 5 → 4 → 3 → 2 → 1 💡 Key Insight: We don’t reverse values — we reverse the links (pointers) between nodes. ⚙️ Approach (Iterative): Use 3 pointers: prev, curr, next Reverse links step-by-step while traversing class Solution { public ListNode reverseList(ListNode head) { ListNode prev = null; ListNode curr = head; while (curr != null) { ListNode next = curr.next; curr.next = prev; prev = curr; curr = next; } return prev; } } 📊 Complexity: Time: O(n) Space: O(1) ✅ (In-place) 🔥 Why this problem matters? Builds strong pointer manipulation skills Foundation for advanced problems (Linked List cycles, merging, etc.) Frequently asked in coding interviews 💬 Pro Tip: Always draw the list and simulate pointer movement — it makes everything crystal clear! #LeetCode #DataStructures #LinkedList #CodingInterview #Java #100DaysOfCode #DSA #TechLearning
To view or add a comment, sign in
-
Explore related topics
- Leetcode Problem Solving Strategies
- LeetCode Array Problem Solving Techniques
- Build Problem-Solving Skills With Daily Coding
- Approaches to Array Problem Solving for Coding Interviews
- Problem Solving Techniques for Developers
- Prioritizing Problem-Solving Skills in Coding Interviews
- Problem-Solving Skills in Engineering Interviews
- Solving Sorted Array Coding Challenges
- How to Solve Real Problems
- Strategies for Solving Algorithmic Problems
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