You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Pattern Used: Two Pointers (In-place Deduplication)
* Why this pattern: For a sorted array, duplicates are adjacent, so a slow pointer marks the last unique position while a fast pointer scans ahead, enabling in-place removal in one pass.
*
* Interview Scenario:
* "A staple LeetCode Easy asked at Amazon/Microsoft: 'Given a sorted array of log timestamps, remove duplicate entries in-place and return the new length.' Tests in-place array mutation without extra memory."