Day 5/100 – Data Structures & Algorithms Problems Solved: • Design Linked List • Rotate List • Intersection of Two Linked Lists • Minimum Index Sum of Two Lists • Remove Duplicates from Sorted List • Remove Duplicates from Sorted List II Concepts Practiced: • Linked List manipulation • Pointer traversal • Hashing for lookup optimization • Handling duplicates in sorted structures Key Learning: Working with Linked Lists improves understanding of pointer movement, node manipulation, and efficient traversal techniques. Staying consistent with daily problem solving while preparing for backend development roles. #100DaysOfCode #DSA #LeetCode #Java #BackendDevelopment
Linked List Problems & Solutions in Java
More Relevant Posts
-
Day #10 / 100 — Data Structures & Algorithms Today’s focus was on array patterns and two-pointer techniques. Problems solved: • Maximum Subarray • Container With Most Water • Minimum Size Subarray Sum • Longest Substring Without Repeating Characters • 4Sum • Maximum Width Ramp • Boats to Save People Key takeaway: Many array problems reduce to a few core ideas — sliding window, two pointers, greedy choices, or prefix-based reasoning. Recognizing these patterns is gradually making problem-solving faster and more intuitive. #100DaysOfCode #DSA #LeetCode #Java #BackendDevelopment AccioJob
To view or add a comment, sign in
-
-
Day #8 / 100 – Data Structures & Algorithms Today’s focus was on advanced linked list problems and pointer manipulation. Problems solved: • Flatten a Multilevel Doubly Linked List • Design Browser History • Insertion in Circular Linked List • Swap Kth Nodes from End • Rotate the List • Insert Node in a Doubly Linked List • Delete Node in Doubly Linked List • Copy List with Random Pointer Key takeaway: Linked list problems heavily test pointer management and edge case handling, especially when working with structures like circular lists, multilevel lists, or random pointers. Consistent practice is helping strengthen problem-solving and implementation skills while preparing for backend engineering roles. #100DaysOfCode #DSA #LeetCode #Java #BackendDevelopment #Acciojob
To view or add a comment, sign in
-
-
Today I solved LeetCode 107 – Binary Tree Level Order Traversal II. 🧩 Problem Summary: Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. Instead of returning the traversal from top to bottom, the result should be returned from the lowest level up to the root. 💡 Key Concepts Used: Binary Trees Breadth First Search (BFS) Queue data structure Level Order Traversal Bottom-up traversal logic 🧠 Approach: Use a queue to perform level order traversal (BFS). Process nodes level by level. For each level, collect the node values into a list. Instead of adding the level at the end, insert it at the beginning of the result list. This automatically builds the traversal from bottom to top. 📚 What I Learned: How BFS works in tree-based problems. Processing nodes level by level using a queue. Building bottom-up results efficiently. Strengthening understanding of tree traversal variations. Consistent practice with tree problems helps build stronger algorithmic thinking 🌳 Learning step by step every day 🚀 #LeetCode #DSA #BinaryTree #LevelOrderTraversal #BFS #Queue #Java #CodingJourney #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
Day #12 / 100 — Data Structures & Algorithms Focused on binary search (answer space) problems today. Problems solved: • Split Array Largest Sum • Capacity To Ship Packages Within D Days • Peak Index in a Mountain Array • Search in Rotated Sorted Array #100DaysOfCode #DSA #LeetCode #Java #BackendDevelopment
To view or add a comment, sign in
-
-
🚀 **LeetCode Problem Solved – Max Consecutive Ones III** Today I solved **Problem 1004: Max Consecutive Ones III** using the **Sliding Window technique**. 🔹 **Problem Summary** Given a binary array `nums` containing 0s and 1s and an integer `k`, we are allowed to flip at most `k` zeros to ones. The goal is to determine the **maximum number of consecutive 1s** possible after performing at most `k` flips. 🔹 **Approach** Instead of checking every possible subarray, I used the **Sliding Window (Two Pointer) approach**: • Expand the window using the right pointer • Count the number of zeros in the window • If zeros exceed `k`, move the left pointer to maintain a valid window • Track the maximum window size 🔹 **Complexity** ⏱ Time Complexity: **O(n)** 💾 Space Complexity: **O(1)** 📊 **Result** ✔ 60 / 60 Testcases Passed ⚡ Runtime: **2 ms (Beats 99.93%)** Consistent practice with **Data Structures & Algorithms** helps build strong problem-solving skills and deeper understanding of algorithmic patterns. Always open to learning better approaches or optimizations! 💡 #LeetCode #DSA #Java #SlidingWindow #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
70 LeetCode problems solved. Focused on building a strong foundation in Data Structures & Algorithms through consistent daily practice. Progress so far: • Covered core topics: Arrays, Strings, Recursion, Backtracking • Started solving medium-level problems regularly • Improving problem-solving approach and pattern recognition Approach: • Solve first, then analyze better solutions • Focus on patterns, not just individual questions Staying locked in on the process. #LeetCode #DSA #Java #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🔥 Day 26/30 — #30DaysDSAChallenge Today I revisited one of the simplest sorting algorithms: Selection Sort. This is the first intuitive solution that comes to mind when I think of sorting. The idea is simple: 1️⃣ Find the smallest element in the array 2️⃣ Swap it with the first position 3️⃣ Repeat the same process for the remaining elements Example: Input: [64, 25, 12, 22, 11] Step 1 → Find the smallest (11) → swap with first Array becomes: [11, 25, 12, 22, 64] Step 2 → Find the smallest in the remaining array (12) Array becomes: [11, 12, 25, 22, 64] And the process continues until the array is sorted. ⚙️ Complexity ⏱ Time Complexity: O(n²) 💾 Space Complexity: O(1) (in-place sorting) One interesting thing is that Selection Sort always performs the same number of comparisons, regardless of whether the array is already sorted or not. 🧠 What I learned today Even though Selection Sort isn't efficient for large datasets, understanding these basic algorithms builds the foundation for more advanced sorting techniques. Are there any algorithms you revisited recently that made more sense the second time? #DSA #Java #Algorithms #ProblemSolving #Day26 #ConsistencyCurve
To view or add a comment, sign in
-
-
Day 53 of My DSA Journey Today I solved a problem on searching an element in a rotated sorted array with duplicates. The array is originally sorted but rotated at some pivot. The task is to determine whether a given target value exists in the array. 🔎 My Approach Instead of directly jumping to complex techniques, I used a simple linear search approach: Traverse through the array from start to end. Compare each element with the target value. If a match is found, return true. If the loop finishes without finding the target, return false. 💡 Key Takeaway Sometimes starting with a simple and correct solution is important before optimizing. While more efficient approaches like modified binary search can reduce time complexity, this straightforward method helps clearly understand the problem first. ⏱ Time Complexity: O(n) Every day I’m improving my problem-solving skills in Java and Data Structures & Algorithms step by step. #Day53 #DSA #Java #ProblemSolving #CodingJourney #LeetCode #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 DSA Journey | Day 4 — Majority Element (LeetCode) Today, I solved the Majority Element problem and focused on improving my approach from a brute force solution to an optimized one. 🔹 🧠 Problem Understanding Given an integer array, the task is to find the element that appears more than ⌊n/2⌋ times. ✔ The problem guarantees that a majority element always exists ✔ Focus is on optimizing the approach efficiently 🔹 ⚙️ Approach 1: Brute Force For each element, I traversed the entire array again to count its frequency If the frequency exceeded n/2, I returned that element ❌ Time Complexity: O(n²) 👉 Works fine but not scalable for large inputs 🔹 ⚡ Approach 2: Optimized (Using HashMap) Stored frequency of elements using a HashMap Identified the element with count greater than n/2 ✔ Time Complexity: O(n) ✔ Space Complexity: O(n) 💡 Significant improvement compared to brute force 🔹 💡 Key Learnings ✔ How to optimize from O(n²) → O(n) ✔ Importance of choosing the right data structure ✔ Better understanding of frequency-based problems #DSA #LeetCode #Java #ProblemSolving #CodingJourney #Day4 #Learning #Algorithms
To view or add a comment, sign in
-
-
🚀 Day 48 of #100DaysOfCode Solved 295. Find Median from Data Stream on LeetCode 📊 🧠 Key Insight: We need to dynamically maintain numbers and efficiently return the median at any time. A naive approach (like maintaining a sorted list) works but is not optimal for large inputs. ⚙️ Approach Used (Sorted List + Binary Search): 1️⃣ Maintain a sorted list 2️⃣ Insert each incoming number at the correct position using Binary Search 3️⃣ For median: 🔹If size is odd → return middle element 🔹If even → return average of two middle elements ⏱️ Time Complexity: 🔹Insert: O(n) (due to shifting) 🔹Median: O(1) 📦 Space Complexity: O(n) #100DaysOfCode #LeetCode #DSA #Heaps #BinarySearch #Algorithms #Java #InterviewPrep #CodingJourney
To view or add a comment, sign in
-
Explore related topics
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