100DaysOfCode: LeetCode Challenge and Spring Boot Exception Handling

🚀 #100DaysOfCode – Day 14 Consistency is turning into discipline. Small steps, every day 💯 ✅ What I accomplished today: 🧠 LeetCode Daily Challenge – Judge Route Circle 📌 Problem Overview: Given a string of moves consisting of U, D, L, R, determine: The robot starts at origin (0,0) Each move changes its position Goal → Check if it returns back to origin 💡 My Approach (Counting Logic): 🔹 Counted frequency of each move 🔹 Compared: ✔ Up vs Down ✔ Left vs Right 🔹 If both are equal → robot returns to origin ⚡ Time Complexity: O(n) ⚡ Space Complexity: O(1) 🧩 Key Insight: This problem helped me understand: ✔ How simple counting can replace simulation ✔ Importance of balance conditions ✔ Writing clean and optimized logic ✔ Avoiding unnecessary computations 🔗 LeetCode Submission Link: https://lnkd.in/gvBucvjB ☕ Spring Boot Learning – Exception Handling 🔹 Today I learned how to handle errors effectively in Spring Boot 📌 Key Concepts Covered: ✔ Using @ExceptionHandler for handling specific exceptions ✔ Handling scenarios like Employee Not Found gracefully ✔ Returning proper HTTP status codes (404, etc.) ✔ Understanding how Optional can throw exceptions 🌍 Global Exception Handling: ✔ Learned @RestControllerAdvice for centralized handling ✔ Created a global exception layer ✔ Kept controllers clean and focused ✔ Explored validation annotations like @AssertTrue, @AssertFalse 🧠 Big Learning: A good backend is not just about success responses— it’s about how well you handle failures and edge cases. 📝 Spring Boot Notes: https://lnkd.in/gakX9V-X 🔥 Learning Streak: Day 14/100 Discipline > Motivation. Let’s keep building 🚀 #100DaysOfCode #Java #SpringBoot #BackendDevelopment #LeetCode #DSA #ProblemSolving #CodingJourney #SoftwareDevelopment #LearningInPublic #Developers #Consistency #BuildInPublic

  • text

To view or add a comment, sign in

Explore content categories