🚀 30 Days of DSA — Day 1 Starting today, I'm committing to solving one Data Structures & Algorithms problem every day for the next 30 days. Why this challenge? • Strengthen problem-solving skills • Build consistency • Learn in public 📌 Day 1 Problem: Bubble sort implementation 🧠 Approach: Compared adjacent elements and swapped them if they were in the wrong order. Repeated this process multiple times until the array was sorted. ⏱️ Time Complexity: O(n²) 💡 Key Learning: Bubble Sort is simple but inefficient for large datasets. Great for understanding sorting fundamentals. Let's see where this journey takes me. If you're also working on DSA, feel free to connect or share your approach 👇 #30DaysOfDSA #Java #SpringBoot #JavaDeveloper #DSA #DataStructures #Algorithms #CodingChallenge #ProblemSolving #SoftwareEngineer #BackendDeveloper #LearningInPublic #CodingJourney #Developers #TechCommunity
30 Days of DSA - Day 1: Bubble Sort Implementation
More Relevant Posts
-
🚀 Starting My Daily DSA Challenge Series! Consistency is the key to mastering Data Structures & Algorithms — and that’s exactly what this series is about. 📌 Problem #01 is live! A simple yet tricky question that tests your understanding of: Array indexing Operator precedence 💡 Take a moment, solve it, and drop your answer in the comments. I’ll be sharing such problems daily to help improve problem-solving skills and build strong fundamentals. 🤝 Feel free to connect if you’re also preparing for placements or improving your DSA skills. #DSA #Coding #Java #ProblemSolving #PlacementPreparation #LearningInPublic #SoftwareEngineering
To view or add a comment, sign in
-
-
DSA Day 4 – Simple Problem, Important Insight Today I solved the “Contains Duplicate” problem on LeetCode. Problem: Check if any element appears more than once in an array. Initial Thought: -> Use nested loops to compare every pair -> Time Complexity: O(n²) ❌ Optimized Approach: -> Used HashMap to track elements -> While iterating, check if element already exists -> If yes → duplicate found Time Complexity: -> O(n) -> Space Complexity: O(n) Key Learning: -> Not every problem needs complex logic -> Choosing the right data structure makes a big difference -> Hashing is one of the most powerful tools in DSA What I Realized: Sometimes the simplest problems teach the most important concepts. Thanks to Pulkit Aggarwal sir for guiding me in DSA and helping me build strong fundamentals. Staying consistent, one day at a time. #DSA #LeetCode #Java #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 3-Month DSA Challenge | Week 4 Continuing my journey of consistent DSA practice and sharing my weekly progress. 📚 Week 4 Topic: Recursion & Backtracking (Deep Practice) 📌 Problems I practiced: 🔹 Reverse String 🔹 Fibonacci Number 🔹 Binary Watch 🔹 Power of Two / Pow(x, n) 🔹 Print N to 1 (without loop) 🔹 Generate Parentheses 🔹 Combinations 🔹 Combination Sum I & III 🔹 Subsets & Subsets II (Power Set) 🔹 Permutations II 🔹 Word Break 🔹 Restore IP Addresses 🔹 Predict the Winner 🔹 Count Good Numbers 🔹 Rat in a Maze (Multiple Jumps) 🔹 N-Queens 🔹 Handshakes Problem 🔹 Bracket Challenge 💭 My Learning: Recursion became much clearer when I started visualizing recursion trees. Backtracking helped me understand how to explore all possibilities and undo choices efficiently. ✅ Solved 20+ problems to strengthen recursion and backtracking patterns. This week was challenging but very important for improving problem-solving skills 💪 #DataStructures #DSA #Recursion #Backtracking #Java #CodingJourney #Learning #InterviewPreparation
To view or add a comment, sign in
-
🚀 #Day31/300 — Mastering DSA Challenge Continuing my 300-day journey to strengthen my Data Structures & Algorithms skills using Java. 📌 Daily Goals • Solve at least 1 problem every day • Focus on pattern recognition and optimized solutions • Share consistent learning updates along the journey 🧠 Today’s Problem: Smallest Range in K Lists Solved this problem using a Min Heap (Priority Queue) approach along with tracking the current maximum element. The idea is to always consider one element from each list and minimize the range between the minimum and maximum values. 💡 Key Takeaways: • Use Min Heap to track the smallest element among K lists • Keep updating the current maximum to calculate range • Helps in solving multi-pointer problems efficiently • Time Complexity: O(n log k) This problem strengthened my understanding of heap-based merging, range optimization, and handling multiple sorted lists. Staying consistent and improving every day in this 300-day DSA journey. 💪 #DSA #Java #ProblemSolving #BackendDeveloper #FullStackDeveloper #300DaysChallenge #LearningInPublic #Heap #PriorityQueue #Algorithms #SDE #React #ReactNative #JavaFullStack #SpringBoot
To view or add a comment, sign in
-
-
🚀 DSA Journey — Day 17: Mastering Binary Search (LeetCode 704) Today I worked on one of the most fundamental and powerful algorithms in DSA — Binary Search. 🔍 Problem Understanding Given a sorted array, we need to efficiently find the index of a target element. If it exists, return its index; otherwise, return -1. 💡 Brute Force Approach Traverse the array linearly Compare each element with target Time Complexity: O(n) ⚠️ Not optimal for large datasets ⚡ Optimized Approach — Binary Search Since the array is sorted, we can eliminate half of the search space in every step. 👉 Steps: Initialize start = 0, end = n-1 Find middle: mid = (start + end) / 2 Compare: If nums[mid] == target → return index If target < mid → move left (end = mid - 1) If target > mid → move right (start = mid + 1) Repeat until found or search space ends 🧠 Example Walkthrough Array: [-1,0,3,5,9,12], Target: 9 mid = 2 → value = 3 → move right mid = 4 → value = 9 → ✅ Found ⏱️ Complexity Analysis Time Complexity: O(log n) Space Complexity: O(1) 🎯 Key Learning Binary Search is not just a problem — it's a pattern. Understanding this deeply will help in: Searching problems Optimization problems Many advanced DSA questions 🙏 Gratitude Grateful for the consistency and learning mindset every day 🙌 📈 Consistency is the real game changer. One problem a day = big results. #DSA #BinarySearch #LeetCode #CodingJourney #Java #ProblemSolving #Consistency #Learning #TechJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 DSA Preparation 💪 Solved this problem in my first attempt 🎯 Focused on finding the closest index using simple traversal and distance calculation. A good exercise to strengthen array fundamentals and logical thinking 🔥 🧠 Problem 🔎 Minimum Distance to the Target Element Given an array nums, a target, and a start index: 👉 Find an index i such that nums[i] == target 👉 Return the minimum absolute difference |i - start| 📌 It is guaranteed that the target exists in the array. Example Input: nums = [1,2,3,4,5], target = 5, start = 3 Output: 1 Input: nums = [1], target = 1, start = 0 Output: 0 ⚡ Key Learning 📌 Traverse the array and track minimum distance 📌 Use absolute difference for comparison 📌 Time Complexity: O(n) 📌 Space Complexity: O(1) First attempt success ✅ Improving DSA step by step 🚀 #DSA #LeetCode #Arrays #ProblemSolving #Java #Consistency
To view or add a comment, sign in
-
-
🚀 #Day30/300 — Mastering DSA Challenge Continuing my 300-day journey to strengthen my Data Structures & Algorithms skills using Java. 📌 Daily Goals • Solve at least 1 problem every day • Focus on pattern recognition and optimized solutions • Share consistent learning updates along the journey 🧠 Today’s Problem: Find Median from Data Stream Solved this problem using the Two Heaps approach (Max Heap + Min Heap). Maintained one heap for the smaller half of elements and another for the larger half to efficiently calculate the median at any point. 💡 Key Takeaways: • Use Max Heap for the left half and Min Heap for the right half • Balance both heaps to maintain size difference ≤ 1 • Median can be retrieved in O(1) time • Time Complexity per insertion: O(log n) This problem strengthened my understanding of heap balancing, stream processing, and real-time median calculation. Staying consistent and improving every day in this 300-day DSA journey. 💪 #DSA #Java #ProblemSolving #BackendDeveloper #FullStackDeveloper #300DaysChallenge #LearningInPublic #Heap #PriorityQueue #Algorithms #SDE #React #ReactNative #JavaFullStack #SpringBoot
To view or add a comment, sign in
-
-
🚀 Starting my DSA Journey Building a strong foundation in problem-solving to write efficient, scalable code. Day 1-3: Pattern Problems (Basics of Loops) Apna College 🧠 Why this matters: In software development, every feature, optimization, or bug fix ultimately depends on how well you break down and solve problems. Patterns may seem simple, but they train the core thinking required to structure logic clearly. ⚙️ What I learned: • Breaking problems into rows and columns (structured thinking) • Using nested loops to handle multi-level logic • Converting thought process → step-by-step implementation • Improving clarity through simple pattern-based problems 🔁 Understanding Loops: • Core tool for controlling execution and repetition • Widely used in arrays, matrices, and real-world data processing • Foundation for advanced concepts like recursion, dynamic programming, and graph traversal 🧩 Problem-Solving Approach: 1)Visualize the expected output 2)Break it into smaller logical units (rows/columns) 3)Map logic to loop structure 4)Implement step-by-step 5)Refine and optimize 📈 Takeaway: Strong fundamentals don’t just solve easy problems — they build the mindset required for solving complex systems efficiently #DSA #Coding #ProblemSolving #Java #Challenge
To view or add a comment, sign in
-
-
🚀 DSA Preparation 💪 Solved an advanced Binary Search problem on a rotated sorted array. Learned how to identify the sorted half and efficiently narrow down the search space 🔥 🧠 Problem 🔎 Search in Rotated Sorted Array Given a sorted array nums that is rotated at an unknown index, and a target value: 👉 Return the index of the target if found, otherwise return -1. 👉 The solution must run in O(log n) time complexity. Example Input: nums = [4,5,6,7,0,1,2], target = 0 Output: 4 Input: nums = [4,5,6,7,0,1,2], target = 3 Output: -1 Input: nums = [1], target = 0 Output: -1 ⚡ Key Learning 📌 Even after rotation, one half of the array is always sorted 📌 Use Binary Search to decide which half to explore 📌 Time Complexity: O(log n) → reduces search space by half in each step, making it highly efficient even for large inputs 📌 Space Complexity: O(1) Improving DSA with advanced searching techniques 🚀 #DSA #LeetCode #BinarySearch #Algorithms #Java #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🚀 Day 56 of my DSA Journey Today, I worked on a Hard-level problem from LeetCode: 👉 Problem #4 – Median of Two Sorted Arrays (LeetCode) This problem is well-known for its complexity and is frequently asked in top product-based companies. 💡 What I focused on: Understanding the problem deeply instead of jumping directly to the optimal solution Implementing a merge + sort approach to build a clear foundation Applying the two-pointer technique to efficiently identify the median Handling both odd and even length cases carefully ⚙️ Approach Used: Merged both input arrays into a single array Sorted the combined array Used two pointers (i and j) moving towards the center Determined the median based on whether the length is odd or even 📈 Key Learning: Even though the optimal solution has a time complexity of O(log(min(m, n))), building a correct and intuitive approach first is crucial. It strengthens problem-solving skills and helps in understanding advanced techniques later. 🎯 Takeaway: Consistency and clarity in logic are more important than immediately writing the most optimized code. 🔥 Step by step, moving closer to mastering Data Structures & Algorithms. #DSA #LeetCode #ProblemSolving #Java #CodingJourney #PlacementPreparation #Consistency #Learning
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