Day 4 of my DSA journey Today’s focus was on Dynamic Programming and Linked Lists. Key learnings: • Longest Common Subsequence (LCS), Longest Palindromic Subsequence (LPS), and Longest Repeating Subsequence (LRS) • Understood how breaking problems into smaller subproblems and storing results reduces time complexity significantly. • Learned the transition from recursion to dynamic programming for optimal solutions. • Explored Linked Lists and practiced problems involving traversal and pointer manipulation. • Understood the slow and fast pointer technique to detect cycles efficiently. Big takeaway: The real improvement is not just solving problems, but understanding patterns and optimizing solutions. #DSA #100DaysOfCode #Java #ProblemSolving #LearningJourney
Dynamic Programming & Linked Lists in DSA
More Relevant Posts
-
🚀 100 Days Java + DSA Challenge | Day 2 Today’s focus was on strengthening my programming fundamentals by covering: 🔹 Operators in Java (Arithmetic, Relational, Logical, Assignment) 🔹 Conditional Statements (if, if-else, nested if, switch) Understanding how operators work and how decisions are made in code is essential for building strong logic. These concepts are the backbone of problem-solving in Data Structures and Algorithms. 💡 Practiced writing multiple programs using conditions and improved my logical thinking step by step. Consistency is the key — small progress every day leads to big results. #100DaysOfCode #Java #DSA #LearningJourney #Coding #SoftwareDevelopment
To view or add a comment, sign in
-
🚀 Day 51 of My Java DSA Journey Today was a mix of Dynamic Programming 💡 Problem I solved: 📌 Longest Increasing Subsequence (LIS) • Used Dynamic Programming • Built a dp[] array to track longest subsequence ending at each index • Compared all previous elements to extend the sequence 🔍 Key idea: For each element: Find all smaller previous elements and extend the longest subsequence. ⚡ DP Relation: dp[i] = max(dp[j] + 1) where j < i and nums[i] > nums[j] 🎯 Takeaway: Dynamic Programming helps break complex problems into smaller subproblems. #Day51 #90DaysOfCoding #Java #DSA #DynamicProgramming #LIS #leetcode
To view or add a comment, sign in
-
-
🚀 Another step forward in my Java + DSA journey Focused on strengthening problem-solving through creating methods/functions: • Prime number check using √n optimization and early return • Palindrome logic by reversing digits • Factorial with correct loop conditions and edge cases • Clear understanding of return vs print in methods • Writing cleaner, reusable and readable functions 💡 Key takeaway: Breaking problems into methods makes logic clearer and code reusable. Consistent learning, stronger fundamentals 🧠🔥 #Java #DSA #ProblemSolving #Functions #LearningInPublic #Consistency #CodingJourney
To view or add a comment, sign in
-
-
Today I implemented Array Reversal in Java using the Two-Pointer Technique! 🔄 Logic: ∙ Set left = 0 and right = arr.length - 1 ∙ Swap elements at both ends ∙ Move pointers inward until they meet ✅ Input: {1, 2, 3, 4, 5} ✅ Output: 5 4 3 2 1 💡 Why Two-Pointer? Instead of using extra space, we swap in-place — making it O(n) time and O(1) space! No extra array needed. Just two pointers doing the work. 💪 Every small concept I practice brings me one step closer to DSA mastery. Keep building. Keep learning. 🙌 #100daysofcode #dsa #java #program #array #problem #leetcode #javadeveloper #learning
To view or add a comment, sign in
-
-
🚀 Day 19/100 – #100DaysOfCode Challenge Today I worked on an important concept in Binary Search — Lower Bound 🔍 💡 Problem Statement: Find the first index in a sorted array where the value is greater than or equal to a given target (x). ⚡ Key Learning: Lower Bound helps in efficient searching in sorted arrays Instead of linear search (O(n)), we can optimize to O(log n) using Binary Search Very useful in competitive programming & real-world applications 🧠 Approach: Apply Binary Search Store the potential answer Move left to find the smallest valid index ✅ Example: Input: [1,2,2,3], x = 2 Output: 1 💻 What I Practiced Today: Binary Search optimization Edge case handling Writing clean and efficient code 📈 Progress: Improving problem-solving skills step by step! #Day19 #100DaysOfCode #DSA #BinarySearch #CodingJourney #Java #ProblemSolving #Learning
To view or add a comment, sign in
-
-
💻 Built a Diamond Pattern in Java using pure logic and nested loops. While practicing DSA fundamentals, I implemented this pattern by understanding how spaces and stars align in each row. This helped me strengthen my control over loops, conditions, and pattern-based problem solving. 📌 Key Learning: Breaking a complex pattern into smaller logical steps makes it much easier to implement. Consistency in solving such problems is what builds strong programming logic. #Java #DSA #Programming #CodingJourney #ProblemSolving #LogicBuilding #Developers #Learning #100DaysOfCode
To view or add a comment, sign in
-
-
Understanding the difference between shallow copy and deep copy in Java really changed how I think about object handling and memory. A shallow copy duplicates the reference — meaning changes in one object can unexpectedly affect another. On the other hand, a deep copy creates an entirely independent object with its own memory allocation. This concept might seem small at first, but it becomes critical when working with complex data structures, real-world applications, and avoiding unintended side effects. Key takeaway: Always be clear whether you're copying data or just references. #Java #Programming #Learning #DSA #SoftwareDevelopment
To view or add a comment, sign in
-
-
Solved: Shortest Distance to Target String in a Circular Array(#2515) 🔹 Problem Insight: This problem is based on circular array traversal where we calculate both: • Straight Distance • Circular Distance 🔹 Approach: 1.Traverse the array 2.Check for target using equals() 3.Calculate: 👉 Straight Distance = |i - startIndex| 👉 Circular Distance = n - Straight Distance(where n = length of Array) 4.Take minimum of both 🔹 Key Learning: Understanding circular logic and optimizing distance calculation #LeetCode #Java #DSA #CodingChallenge #SoftwareDeveloper
To view or add a comment, sign in
-
-
Day 38 & 39 of my DSA journey with Java Missed posting yesterday, but not the learning! Over the last two days, I focused on Linked Lists and practiced to strengthen my understanding. 📌 What I worked on: Insertion operations (first, last, middle) Traversing and printing a Linked List Remove First & Remove Last Iterative & Recursive Search Reverse a Linked List Find and Remove Nth Node from End Check if Linked List is Palindrome 💻 Also practiced coding these problems to build better understanding. 💡 Key takeaway: Linked Lists become much clearer with practice and dry runs. Understanding pointer manipulation is the key. Consistency is not about posting every day, but about learning every day, even when things get busy #DSA #Java #LinkedList #ProblemSolving #Consistency #CodingJourney #LearningInPublic #PlacementPreparation #day38_39
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