🚀 Day 2 – DSA Practice Log Today was all about strengthening fundamentals and understanding *why* solutions work, not just coding them. 🔸 Rotate Array Learned how to optimize from brute force to the reversal technique (O(n), O(1)) 🔸Fibonacci Compared iterative vs recursive 👉 Realized why iterative is preferred in interviews 🔸 Kadane’s Algorithm 💡 Game changer! 👉 Logic: Extend or restart the subarray 👉 Helps find maximum subarray sum efficiently 🧠 What I learned today: Understanding the logic > memorizing code 📈 Progress update: Getting more comfortable with patterns and problem-solving Let’s keep going 🔥 #100DaysOfCode #DSAJourney #LeetCode #Java #KeepLearning
DSA Practice Log: Fundamentals and Optimization Techniques
More Relevant Posts
-
🚀 From Confusion to Clarity: Day 69 of My DSA Journey Today’s focus was on strengthening core problem-solving patterns and improving implementation clarity. 🔹 Solved and revised key problems across: HashMap, Sliding Window, Prefix Sum, and Kadane’s Algorithm Strengthened understanding of pattern recognition and when to apply them 🔹 Deep Dive: Reverse Linked List (LeetCode 206) Instead of memorizing, I focused on understanding pointer manipulation: ✔️ Learned the importance of storing the next node before breaking links ✔️ Understood how incorrect pointer updates can break the entire structure ✔️ Improved ability to debug and refine my approach step-by-step 💡 Key Insight: Writing code is not enough — understanding why it works is what builds real problem-solving skills. 📈 Progress Mindset: First attempt → Mistakes Debugging → Learning Final solution → Clarity Consistently focusing on patterns + clean implementation + explanation skills to prepare for real interview scenarios. #DSA #LeetCode #Java #ProblemSolving #CodingJourney #SoftwareEngineering #InterviewPreparation
To view or add a comment, sign in
-
-
🚀 Day 2 of My DSA Journey Today I focused on some powerful concepts that are frequently asked in coding interviews. Array Rotation Learned multiple approaches: • Brute Force (O(n*k)) • Extra Array (O(n) space) • Reversal Algorithm (O(n) time, O(1) space) ✅ Fibonacci Series Explored: • Iterative (Best → O(n) time, O(1) space) • Recursive (Simple but inefficient) Kadane’s Algorithm One of the most important algorithms! 👉 Used to find maximum subarray sum in O(n) time 💡 Key takeaway: “Don’t carry negative sum — reset and move forward.” 📌 Practiced problems: • Rotate Array • Fibonacci Number • Maximum Subarray Consistency > Perfection. Day by day improvement 💪 #DSA #LeetCode #CodingJourney #Java #ProblemSolving
To view or add a comment, sign in
-
#Day75 of my second #100DaysOfCode Today’s problem was more about spotting patterns than writing code. DSA • Solved Single Element in a Sorted Array (LeetCode 540, Medium) – Brute: linear scan checking pairs → O(n) – Optimal: binary search using index pattern → O(log n) • Key idea: elements appear in pairs, and the single element breaks this pattern • Used position-based logic to decide which half to search This one really showed how observing patterns can simplify the approach. #DSA #BinarySearch #LeetCode #Algorithms #Java #100DaysOfCode #WomenWhoCode #BuildInPublic #LearningInPublic
To view or add a comment, sign in
-
-
🚀 #60DaysOfLeetCode – Day 33 Today’s problem was Valid Parentheses, a classic stack-based problem that tests understanding of balanced expressions. 🔹 Approach Used: Stack Traverse the string character by character. Push all opening brackets (, {, [ onto the stack. For every closing bracket, check: If the stack is empty → invalid. Pop the top element and verify if it matches the corresponding opening bracket. At the end, if the stack is empty → the string is valid. 🔹 Key Learning: This problem reinforces how stacks help manage nested structures and order-sensitive operations. It’s a fundamental concept frequently asked in interviews. 🔹 Complexity: Time: O(n) Space: O(n) A simple yet powerful problem to strengthen core DSA concepts! 💻🔥 #LeetCode #DSA #Java #CodingChallenge #ProblemSolving #LearningInPublic #60DaysOfCode
To view or add a comment, sign in
-
-
Day 21 #SDE Problem on string manipulation and hashing patterns. Solved: • Roman to Integer • Isomorphic Strings Key Learning: • “Roman to Integer” involves careful handling of special subtraction cases (like IV, IX) while traversing the string. • “Isomorphic Strings” highlights how hashing/mapping between characters ensures a one-to-one relationship between two strings. #LeetCode #DSA #Strings #Hashing #Algorithms #Java #SoftwareEngineering
To view or add a comment, sign in
-
🚀 Starting a New Topic: Recursion 🔥 DSA Challenge – Day 118/360 📌 Topic: String 🧩 Problem: String to Integer (atoi) Problem Statement: Convert a string into a 32-bit signed integer while handling spaces, sign, non-digit characters, and overflow. 🔍 Example: Input: " -42" Output: -42 💡 Approach: Recursion + Parsing 1️⃣ Step 1 – Skip leading spaces and detect sign (+ / -) 2️⃣ Step 2 – Recursively process each digit and build the number 3️⃣ Step 3 – Check overflow at every step and return result ⏱ Complexity: Time: O(n) Space: O(n) (recursive stack) 📚 Key Learning: Always handle overflow during computation, not after building the full number. Recursion simplifies problems by breaking them into smaller subproblems. 💭 New Topic Journey Begins: Excited to dive deep into Recursion and master it step by step! 💪 #DSA #Java #Coding #InterviewPrep #ProblemSolving #TechJourney #118DaysOfCode #LeetCode #Recursion
To view or add a comment, sign in
-
-
Classical Backtracking Problem with a Classical Approach Solved Word Search (LeetCode 79) using a clean and intuitive DFS + Backtracking strategy Approach (Simple & Clear): •Start from every cell that matches the first character of the word. •Use DFS (Depth-First Search) to explore all 4 directions (up, down, left, right). •Mark the current cell as visited (by replacing it temporarily) to avoid revisiting. •If the full word is matched → return true immediately. •Backtrack by restoring the cell when the path doesn’t work. Key Insight: We explore all possible paths, but prune early when characters don’t match — this keeps the solution efficient. ⏱️ Time Complexity: 👉 O(m × n × 4^L) •m × n → starting points •4^L → exploring 4 directions for each character of length L 📌 Space Complexity: 👉 O(L) (recursion stack) 🔥 Clean recursion + smart backtracking = problem cracked! #DSA #Backtracking #LeetCode #CodingInterview #Java #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 3 of My DSA Journey Today was all about Strings & Pattern Matching 🔍 Here’s what I learned: ✅ Anagram Logic Using frequency arrays to compare strings efficiently Learned why c - 'a' is used (index mapping) ✅ String Compression Difference between frequency-based vs consecutive compression Understood why using StringBuilder is important (avoids O(n²)) ✅ KMP Algorithm (Game Changer!) Learned how to search patterns in O(n + m) time Key idea: Don’t restart, jump using LPS Understood LPS (Longest Prefix = Suffix) with step-by-step dry run 💡 Biggest takeaway: 👉 Writing code is easy, but understanding why it's optimal is what really matters. ⚡ From brute force → optimized thinking That shift is the real progress. #DSA #100DaysOfCode #Java #ProblemSolving #LearningJourney #Coding
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