🚀 Week 9 Completed – #100DaysOfCode | DSA in Java Continuing the journey with consistent progress and deeper problem-solving. This week I focused on advanced tree concepts and sliding window technique, which are crucial for coding interviews. 📌 Topics Covered This Week: 🔹 Binary Search Trees (BST) Learned BST properties and operations Solved problems like finding the largest BST in a Binary Tree 🔹 Binary Trees (Advanced) Practiced problems like sum of left leaves Strengthened recursive thinking and tree traversal logic 🔹 Sliding Window Technique Applied sliding window approach to optimize subarray problems Implemented maximum subarray sum using sliding window 📌 Previously Covered Foundation: ✔ Arrays, Strings, Bit Manipulation ✔ Recursion & Backtracking ✔ Linked List, Stack, Queue ✔ Greedy Algorithms & Binary Trees 🧠 Key Learnings • Tree-based problems require a strong understanding of recursion and structure • Sliding window significantly reduces time complexity from O(n²) to O(n) • Choosing the right approach is becoming more intuitive with practice • Focus is now shifting towards optimization and pattern recognition 💻 Maintaining a structured GitHub repository with all topics organized step-by-step and consistent commits. Step by step, moving closer to interview-ready DSA skills. #100DaysOfCode #DSA #Java #ProblemSolving #SlidingWindow #BinaryTree #LearningInPublic
Week 9 Java DSA Progress: BST, Sliding Window
More Relevant Posts
-
Today I worked on a problem that involved finding the maximum count of positive and negative numbers in a sorted array. Key idea: Used Binary Search to efficiently find: The first positive number The first non-negative number From this, we can calculate: Count of positive numbers Count of negative numbers Why Binary Search? Because the array is sorted, it helps reduce time complexity to O(log n) instead of scanning the entire array. What I learned: How to apply binary search beyond just finding elements How to think in terms of boundaries (first occurrence logic) Writing clean and optimized Java code 📌 Problem-solving is not just about coding, it's about thinking efficiently. Looking forward to learning more and improving every day! #Java #DSA #BinarySearch #CodingJourney #ProblemSolving #LearningEveryday
To view or add a comment, sign in
-
-
🚀 Continuing my Java Collection Framework learning series! I have published a new video explaining the Vector class in Java (Part-7) on my YouTube channel CodeFreeEducation. In this video, I explain Vector in a simple and beginner-friendly way, focusing on how it works as a dynamic array and why it is used in thread-safe (synchronized) environments. Topics covered in this video: • What is Vector in Java • Internal working of Vector • Features of Vector • Thread-safe concept (synchronization) • Difference between Vector and ArrayList • Important methods (add, get, remove, size, contains) This video is helpful for beginners learning Java, MCA/BTech/Degree students, and anyone preparing for Java interviews. 🎥 Watch the video here: https://lnkd.in/gEb5rqHg #Java #JavaProgramming #JavaCollectionFramework #Vector #Learning #CodeFreeEducation #JavaDeveloper #Coding #TechLearning
To view or add a comment, sign in
-
-
🔹 Title: Solving “Plus Minus” Problem in Java 📊 🔹 Description: Today I solved the Plus Minus problem, where the goal is to calculate the ratios of positive, negative, and zero values in an array. The challenge was not just counting the values, but also formatting the output correctly to 6 decimal places. 💡 Approach: Traverse the array and count positives, negatives, and zeros Divide each count by the total number of elements Print results using precise formatting 🔹 What I learned: ✔ Importance of output formatting ✔ Handling edge cases (like zeros) ✔ Writing clean and efficient Java code Consistency in practicing such problems really strengthens core programming skills. 🚀 #Java #Coding #ProblemSolving #Programming #DataStructures
To view or add a comment, sign in
-
-
Starting my daily coding challenge series to stay consistent and sharpen problem-solving skills. Problem Statement: Given an integer `day` representing the day number of the week, print the corresponding day name. - The week starts from Monday (1) and ends on Sunday (7). - If the input is less than 1 or greater than 7, print "Invalid." - Ensure only the first letter is capitalized. Example: Input: `3` Output: `Wednesday` Input: `8` Output: `Invalid` Try solving it using: - Conditional statements Consistency beats motivation. See you in Day 2. #100DaysOfCode #CodingChallenge #JavaScript #Python #Java #CPP #ProblemSolving #Developers #SoftwareEngineer #LearnToCode #DSA
To view or add a comment, sign in
-
Today I explored some fundamental yet powerful concepts in Java that every developer should have a strong grip on: 🔹 Static Methods & VariablesUnderstanding how static members are shared across all objects really changed how I think about memory and efficiency. It’s amazing how a simple static keyword can help track object creation and maintain shared data seamlessly. 🔹 Constructor Overloading & this KeywordThis concept made object initialization much more flexible. Using multiple constructors and the this keyword not only improves code readability but also avoids redundancy. 💡 What I realized:Strong basics are the real game-changer. These concepts might look simple, but they build the foundation for writing clean, scalable, and efficient code. 📌 Consistency in learning > Complexity in topics I’m currently focusing on strengthening my core Java skills and building projects around them. Every small concept learned today contributes to becoming a better developer tomorrow. #Java #Programming #CodingJourney #DeveloperLife #JavaDeveloper #Learning #TechSkills #Coding #StudentDeveloper
To view or add a comment, sign in
-
🚀 DSA in Java – Day 89 ✅ Today, I solved the Minimum Distance to the Target Element problem on LeetCode 💻 🔍 Problem Insight: Given an array, a target element, and a starting index — we need to find the minimum distance between the start index and any occurrence of the target. 🧠 Approach I Used: Traversed the array using a loop Checked where the element equals the target Calculated distance using Math.abs(i - start) Updated the minimum distance using Math.min() ⚡ Key Learning: Sometimes the simplest linear traversal (O(n)) gives the most optimal solution. No need to overcomplicate! 💡 Code Concept: Use a variable to track minimum distance Update it whenever a closer target is found 💬 What I Learned Today: Consistency is more important than complexity. Even simple problems strengthen your fundamentals! 🔥 Day 89 Progress: Strengthened problem-solving skills Improved understanding of distance-based logic Practiced writing clean and optimized Java code 📈 Still learning, still growing… one problem at a time! #LeetCode #DSAinJava #ProblemSolving #Java #CodingJourney #Consistency #SoftwareDeveloper 🚀
To view or add a comment, sign in
-
-
🚀 Today’s Learning: ArrayDeque in Java In today’s session, I explored the concept of ArrayDeque, a powerful and efficient data structure in Java. 🔹 Learned the properties of ArrayDeque such as dynamic resizing and fast insertion/deletion 🔹 Explored important methods like addFirst(), addLast(), offer(), poll(), peek(), remove() 🔹 Understood how to access elements using loops and iterators 🔹 Discovered when to use ArrayDeque for both stack (LIFO) and queue (FIFO) operations 💡 Key Insight: ArrayDeque is a better alternative to Stack and often more efficient than LinkedList for queue operations. Excited to implement these concepts in coding and real-world applications! 💻✨ TAP Academy Bibek Singh #Java #ArrayDeque #DataStructures #Coding #LearningJourney #InterviewPrep
To view or add a comment, sign in
-
-
Mastering Java & DSA Through LeetCode Day 34 Today I solved a Medium-level Tree problem that strengthened my understanding of Prefix Sum + DFS — a powerful pattern used in many interview questions. LeetCode Problem: 437. Path Sum III Problem Summary: Given a binary tree and a target sum, we need to find the number of paths where the sum of node values equals the target. The path must go downward (parent → child), but it doesn’t need to start from the root. Key Insight: Instead of checking all possible paths (which is inefficient), we use: Prefix Sum HashMap to store frequencies DFS traversal This helps reduce time complexity from O(n²) → O(n) ⚡ Approach: Maintain a running sum while traversing the tree Check if (currentSum - target) exists in the map Use backtracking to maintain correct state What I Learned: How prefix sum works in trees (not just arrays!) Optimizing brute-force solutions Importance of hashmap in reducing complexity Consistency Update: Day 34 of solving DSA problems daily 💪 Small steps every day = big results over time #LeetCode #Java #DSA #CodingJourney #100DaysOfCode #SoftwareEngineering #PlacementPreparation #CodingInterview
To view or add a comment, sign in
-
-
🚀 Cracked the “Between Two Sets” Problem using Java! I recently worked on a problem that really strengthened my understanding of number theory concepts like LCM (Least Common Multiple) and GCD (Greatest Common Divisor). 🔍 Problem Summary: Given two arrays, the task is to find how many integers satisfy: ✔️ All elements of the first array are factors of the integer ✔️ The integer is a factor of all elements of the second array 💡 Approach I Used: 👉 Calculated LCM of the first array 👉 Calculated GCD of the second array 👉 Counted multiples of LCM that perfectly divide the GCD ✨ This optimized approach avoids brute force and improves efficiency — a great example of applying core math concepts in coding! 🧠 Key Learnings: • Practical use of LCM & GCD • Optimization over brute force • Problem-solving mindset for coding interviews 💻 Implemented in Java and tested with multiple cases successfully. 📌 Always exciting to see how mathematical concepts power efficient algorithms! #Java #DataStructures #Algorithms #Coding #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Mastering Java Through LeetCode 🧠 Day 31 Today I solved a Medium-level Linked List problem that strengthened my understanding of Two Pointers + Reversal Technique — a powerful combination for interviews 📌 LeetCode Problem Solved: Q.2130. Maximum Twin Sum of a Linked List 💭 Problem Summary: In an even-length linked list, each node has a "twin" from the opposite end. The goal is to find the maximum sum of such twin pairs. 🧠 Approach (Optimal): Instead of using extra space, I used an efficient approach: ✔️ Found the middle using slow & fast pointers ✔️ Reversed the second half of the list ✔️ Compared both halves to calculate twin sums ⚡ Key Learning: Reversing part of a linked list can help reduce space complexity from O(n) → O(1), which is crucial for optimization 🚀 ⏱️ Complexity: Time: O(n) Space: O(1) 🔥 Takeaway: This problem shows how combining simple techniques like two pointers + reversal can solve complex problems efficiently. Consistency is the key — showing up every day #Day31 #LeetCode #Java #LinkedList #DSA #CodingJourney #SoftwareEngineering #InterviewPrep #100DaysOfCode #CDAC #AndroidDeveloper
To view or add a comment, sign in
-
More from this author
Explore related topics
- Approaches to Array Problem Solving for Coding Interviews
- Java Coding Interview Best Practices
- Problem Solving Techniques for Developers
- Prioritizing Problem-Solving Skills in Coding Interviews
- Advanced Programming Concepts in Interviews
- DSA Preparation Tips for First Interview Round
- Tips for Coding Interview Preparation
- Common Algorithms for Coding Interviews
- Key DSA Patterns for Google and Twitter Interviews
- 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