🚀 How a small refactor improved performance by 40% Problem: A service was timing out under load. What I changed: Replaced nested loops with HashMap lookups Reduced DB calls using batch fetching Added proper indexes Result: ✅ Faster response time ✅ Happier users ✅ Zero infra cost increase Lesson: Optimization is more about thinking than tools. #Java #PerformanceOptimization #BackendDeveloper #Microservices
Java Performance Boost: 40% Faster Response Time
More Relevant Posts
-
Day 33 – Largest Number Solved a challenging sorting problem where the goal was to arrange numbers such that they form the largest possible number. Key Learnings: Converting integers to strings for flexible comparison Using a custom comparator to compare concatenated values (a+b vs b+a) #DSA #Java #Sorting #Comparator #ProblemSolving #CodingPractice #DataStructures
To view or add a comment, sign in
-
-
Topic: Collection Framework • Collection Framework is used to store and manipulate groups of objects • Core interfaces: List, Set, Queue, Map • Common classes: ArrayList, LinkedList, HashSet, HashMap • Provides built-in methods for sorting, searching, and iteration • Improves data management and code efficiency #Revising #Day28 #Java #CoreJava #Collections #LearningJourney #Consistency
To view or add a comment, sign in
-
LinkedIn Post: Day 19/28 🚀 Day 19: Bridge between structures. Wrapped up the Queue module today and started prepping for Linked Lists. Today's focus: 🔹 Queue Final Review: Comparing performance across different implementations. 🔹 The Shift: Moving from contiguous memory (Arrays) to linked nodes. 🔹 Pointer Logic: Getting my head around how data "points" to the next location. The logic is getting deeper, but the goal remains the same: Consistency. 9 days left! 💻🔥 #DSA #Java #CodingChallenge #Day19 #LinkedLists
To view or add a comment, sign in
-
Day 14/30 – Rotate Image 🚀 Problem: Rotate an n × n matrix by 90° clockwise (in-place). Trick: Rotation = 1️⃣ Transpose the matrix 2️⃣ Reverse each row No extra space used. Pure in-place transformation. Time Complexity: O(n²) Space Complexity: O(1) Matrix manipulation feels satisfying 🔥 #30DaysOfCode #Java #DSA #Matrix #ProblemSolving #InterviewPrep
To view or add a comment, sign in
-
-
Topic: Collection Framework (Map) • Map stores data in key–value pairs • Keys are unique, values can be duplicated • HashMap allows one null key and multiple null values • LinkedHashMap maintains insertion order • TreeMap stores keys in sorted order #Revising #Day30 #Java #CoreJava #Collections #Map #LearningJourney #Consistency
To view or add a comment, sign in
-
🚀 Day 36 / 100 | Insert Interval -Intuition: -This problem is based on interval merging with insertion. The Simple idea is to insert the new interval in the correct position and merge if overlapping occurs. If the current interval ends before the new interval starts, there is no overlap, so add it directly. If the current interval starts before or equal to the new interval end, they overlap. "So instead of adding separately, update the new interval by taking the minimum start and maximum end". Once merging is done, add the merged interval and then add the remaining intervals. -Approach: O(n) Traverse all intervals from left to right. First, add all intervals that come before the new interval (no overlap). Then merge all overlapping intervals by updating: new.start = min(new.start, current.start) new.end = max(new.end, current.end) Add the merged interval to result. Finally, add all remaining intervals that come after. -Complexity: Time Complexity: O(n) Space Complexity: O(n) #100DaysOfCode #Java #DSA #LeetCode
To view or add a comment, sign in
-
-
Day 43/100 🚀 If you can’t explain your logic simply, you don’t own it yet. Built the isomorphic strings solution using Map + Set today. Key takeaways: One map isn’t enough → a set prevents duplicate mappings Early exits = cleaner logic + faster checks Visualizing the flow makes viva/interviews easier On to Day 44. Consistency beats intensity. #100DaysOfCode #Day43 #DSA #Java #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
🚀 #100DaysOfCode | Day 37 📌 LeetCode – Remove Duplicates from Sorted List Today I solved a classic Linked List problem focused on pointer manipulation and in-place updates. Given the head of a sorted linked list, remove all duplicates so that each element appears only once and return the modified list. 💡 Approach Since the list is already sorted, duplicate values appear next to each other. Instead of using extra space like a HashSet, I used a single pointer to traverse the list: ✔️Compare the current node with the next node ✔️If values are equal → skip the duplicate ✔️Otherwise → move forward ✔️Continue until reaching the end ⏱ Complexity Time Complexity: O(n) Space Complexity: O(1) Every linked list problem improves pointer confidence step by step 💪 #Java #DataStructures #LinkedList #LeetCode #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
🚀 Day 41 / 100 | Spiral Matrix II -Intuition: -The goal is to generate an n × n matrix filled with numbers from 1 to n^2 in spiral order. -Start from the top row, move right, then move down the right column, then move left across the bottom row, and finally move up the left column. -After completing one layer, shrink the boundaries and repeat the process until the matrix is filled. -Approach: O(n²) -Initialize an empty n × n matrix. -Maintain four boundaries: top, bottom, left, and right. -Start filling numbers from 1 to n^2. -Fill the top row from left -> right and move the top boundary down. -Fill the right column from top -> bottom and move the right boundary left. -Fill the bottom row from right ->left and move the bottom boundary up. -Fill the left column from bottom -> top and move the left boundary right. -Repeat the process until all elements are filled. -Complexity: Time Complexity: O(n²) Space Complexity: O(n²) #100DaysOfCode #Java #DSA #LeetCode #Matrix
To view or add a comment, sign in
-
-
🚀 Day 15 of #100DaysOfCode Solved Reverse Linked List on LeetCode 🔄🔗 🧠 Key insight: Reversing a linked list is all about careful pointer manipulation. By tracking prev, current, and next, we can reverse links in-place without extra memory. ⚙️ Approach: 🔹Initialize prev = null, current = head 🔹Store next node before breaking the link 🔹Reverse current.next to point to prev 🔹Move pointers forward until the list ends ⏱️ Time Complexity: O(n) 📦 Space Complexity: O(1) #100DaysOfCode #LeetCode #DSA #LinkedList #Java #ProblemSolving #LearningInPublic #CodingJourney
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