100DaysOfCode Day 15: Solved Two Sum II on LeetCode

📅 Day 15 / 100 – #100DaysOfCode Solved Two Sum II – Input Array Is Sorted on LeetCode 💻 Today’s focus was on improving problem-solving by leveraging sorted array properties. 🔍 What I learned: Practiced the HashMap approach (O(n) time, O(n) space) Understood how 1-based indexing works in this problem Realized that since the array is sorted, this can be optimized further using the Two Pointer technique (O(1) space) 🔥 🧠 Key Insight: Don’t just solve the problem — look for constraints (like sorted arrays) to optimize further. ⚡ Next Step: Will implement the Two Pointer approach to achieve constant space complexity. Consistency > Motivation. Let’s keep building 💪 #Day15 #100DaysOfCode #DSA #LeetCode #ProblemSolving #CodingJourney

  • graphical user interface, text

To view or add a comment, sign in

Explore content categories