DEV Community

Yash
Yash

Posted on

Day 2 / 90 – Two Pointer Pattern šŸ” | DSA Journey šŸš€

oday I focused on mastering the Two Pointer Pattern, a powerful technique to optimize brute-force solutions from O(n²) → O(n).

šŸ“Œ What I learned

When & where to use two pointers

Works best with arrays, strings & linear data structures

Helps write clean, efficient interview-ready code

🧠 Problems Solved
āœ… 125. Valid Palindrome
āœ… 344. Reverse String
āœ… 977. Squares of a Sorted Array
āœ… 680. Valid Palindrome II

ā±ļø Most solutions achieved O(n) time & O(1) space

Key takeaway: Pattern recognition > memorizing solutions.

On to Day 3 šŸ’Ŗ

Day2 #DSA #TwoPointers #CodingJourney #90DaysOfDSA #LeetCode #InterviewPrep

Top comments (0)