Crossed 90+ DSA problems on LeetCode — but focusing on something more important than just numbers. • Solving problems with complete understanding (no shortcuts) • Practicing patterns like Binary Search, Hashing, Sliding Window • Re-solving to improve recall under pressure • Applying this in real OAs and contests Recently attempted OAs involving Graphs and Dynamic Programming — a strong reminder that real performance matters more than problem count. Alongside DSA, I’m building backend systems using Java & Spring Boot to stay aligned with real-world development. Consistently working on improving problem-solving speed, clarity, and correctness. #DSA #Java #BackendDevelopment #LeetCode #SoftwareEngineering
Improving DSA with Real-World Application and Java Development
More Relevant Posts
-
Day 93 - LeetCode Journey Solved LeetCode 9: Palindrome Number in Java ✅ At first glance, it feels like a string problem… but the real challenge is solving it without converting to string. Instead of reversing the whole number, I reversed only half of it and compared both parts. This avoids overflow and keeps it efficient. Smart approach > brute force 💡 Key takeaways: • Handling edge cases (negative numbers, trailing zeroes) • Reversing only half of the number • Avoiding extra space (no string conversion) • Writing optimized mathematical logic ✅ All test cases passed ⚡ O(log n) time and O(1) space Sometimes the best solutions are the simplest ones, just a different way of thinking 🔥 #LeetCode #DSA #Java #Math #ProblemSolving #CodingJourney #InterviewPrep #Consistency #100DaysOfCode
To view or add a comment, sign in
-
-
Day 95 - LeetCode Journey Solved LeetCode 1700: Number of Students Unable to Eat Lunch in Java ✅ At first it looks like a simulation problem using queue + stack… but the real trick is to avoid simulation completely. Instead of rotating the queue again and again, I simply counted preferences and matched them with sandwiches. Smart counting beats brute force 💡 Key takeaways: • Avoid unnecessary simulation • Use counting instead of queue operations • Greedy thinking simplifies the problem • Writing clean and optimal logic ✅ All test cases passed ⚡ O(n) time and O(1) space Sometimes the best solution is not doing what the problem is asking literally 🔥 #LeetCode #DSA #Java #Greedy #ProblemSolving #CodingJourney #InterviewPrep #Consistency #100DaysOfCode
To view or add a comment, sign in
-
-
JETPACK COMPOSE PERFORMANCE & STABILITY If your Layout Inspector is showing high recomposition counts, don't just reach for @Stable. The compiler is smart, but it can’t always infer stability for classes from external libraries (like java.util.List). THE FIX? 1. Use ImmutableList from Kotlinx Collections. 2. Use a "UI State" wrapper class annotated with @Immutable. 3. Defer state reads using lambdas (e.g., Modifier.offset { IntOffset(x = state.value, y = 0) }) so you skip the composition phase entirely and go straight to the layout/draw phase. #JetpackCompose #AndroidPerformance #Kotlin #MobileDevelopment #CleanCode
To view or add a comment, sign in
-
Day 96 - LeetCode Journey Solved LeetCode 901: Online Stock Span in Java ✅ This problem is all about recognizing the pattern and using the right data structure. Instead of checking previous prices one by one, I used a Monotonic Stack to efficiently calculate spans. Every element is pushed and popped at most once → super optimized 🔥 Key idea: Keep removing smaller or equal previous prices and accumulate their spans. Key takeaways: • Monotonic Stack concept (very important) • Avoiding nested loops using stack optimization • Efficient span calculation • Thinking in patterns, not brute force ✅ All test cases passed ⚡ O(n) time and O(n) space This is one of those problems that truly levels up your stack game 💯 #LeetCode #DSA #Java #Stack #MonotonicStack #ProblemSolving #CodingJourney #InterviewPrep #Consistency #100DaysOfCode
To view or add a comment, sign in
-
-
Day 63 – 100 Days of DSA (Java) 🔹 Problem: LeetCode 1221 – Balanced String Split 🔹 Approach: Used a greedy strategy by traversing the string once and tracking the balance between characters. Increase count for one character and decrease for the other. Whenever the balance becomes zero, it indicates a valid balanced substring. 🔹 Idea: A balanced string means equal number of 'L' and 'R'. Instead of counting both separately, maintain a single balance variable. Whenever balance = 0 → one valid split found. 🔹 Complexity: Time Complexity: O(n) Space Complexity: O(1) 🔹 Key Learning: Greedy approach with balance tracking Concept similar to prefix sum / counter balancing Pattern useful in parentheses and substring problems 🔹 Improvement Insight: Optimized by reducing two counters into a single balance variable for cleaner logic. Day 63 completed #100DaysOfCode #100DaysOfDSA #DSA #Java #CodingJourney #LeetCode #ProblemSolving #Algorithms #Greedy #CodingPractice #Consistency #TechJourney
To view or add a comment, sign in
-
-
🚀 Day 25/100 Days of Code Challenge 🔥 Problem: Rotate String(Leetcode 796) We are given two strings s and goal. 👉 We need to check if we can rotate string s (move first character to last again and again) to make it equal to goal. 📌 Example: abcde → bcdea → cdeab → deabc → eabcd ⚙️ Approach Check if lengths of both strings are equal Concatenate string with itself → s + s Check if goal exists inside the new string ⏱️ Complexity Time Complexity: O(n) Space Complexity: O(n) 📚 What I Learned ✔️ Simple tricks can save time ✔️ Avoid unnecessary loops ✔️ Think smart, not hard 💪 Day by day improving 🚀 #100DaysOfCode #Coding #Java #DSA #LearningJourney
To view or add a comment, sign in
-
-
💡 Day 43 Solved "House Robber" Problem #198 using Java! Today I worked on a classic Dynamic Programming problem on LeetCode – House Robber 🏠💰 🔍 Problem: Find the maximum amount of money you can rob without robbing two adjacent houses. 🧠 Approach: At every step, we decide: ✔️ Rob current house → add value + profit from i-2 ✔️ Skip current house → take profit from i-1 We choose the maximum of these two options. 🚀 Optimization: Instead of using a DP array, I used two variables to reduce space complexity to O(1). ⏱ Time Complexity: O(n) 📦 Space Complexity: O(1) This problem is a great example of how dynamic programming simplifies complex decisions! #LeetCode #Java #DynamicProgramming #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 91 — LeetCode Practice 🚀 Today’s focus was on string processing and distance calculation. ✅ Problem Solved: 🔹 Shortest Distance to a Character 💡 Key Learnings from Today: • Understood how to calculate minimum distance between characters • Strengthened nested loop logic and condition checking • Learned how to track and update minimum values efficiently • Improved problem-solving using brute-force approach • Practiced working with strings and indices 📌 Approach Used: For each character in the string, I checked all positions of the target character and calculated the minimum distance. 🎯 Next Step: Will optimize this solution using two-pass approach (left-to-right & right-to-left) for better efficiency. Consistency is building step by step 💪 #Day91 #LeetCode #CodingJourney #Java #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Just cracked LeetCode #9 – Palindrome Number. Sounds simple, but the follow-up challenge of solving it without converting to a string makes you really think about the math behind it. 🚀 The approach was straightforward — reverse the number mathematically (no string conversion!) and compare it with the original. Negative numbers and trailing zeros are the edge cases that catch you off guard if you're not careful. 🧑💻 Beats 79.66% in runtime and 95.20% in memory. Not perfect, but I'll take it. One problem at a time. That's the game. 💪 #LeetCode #Java #DSA #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
100 Days of Coding Challenge – Day 33 🚀 📌 Problem: Longest Mountain in Array 💻 Language: Java 🔍 Platform: LeetCode Approach Used: Peak Expansion / Two Pointers 1. Traverse the array and identify a peak element (greater than both neighbors) 2. From the peak, expand left while elements are increasing 3. Expand right while elements are decreasing 4. Calculate the length of the mountain (right - left + 1) 5. Track the maximum length across all valid peaks Time Complexity: O(n) Space Complexity: O(1) 🔗 Problem Link: https://lnkd.in/gS3Uzs3t 🔗 Code Link: https://lnkd.in/gG8gq2KU #100DaysOfCode #Day33 #Java #DSA #LeetCode #ProblemSolving #CodingJourney #TwoPointers #Array
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
good brooo