Simplify a sorted array nums by removing duplicates in-place while maintaining the original order. Return the count of unique values in nums.
With what pattern can we solve this problem in linear time and constant space ?
Given an integer array score with unique scores, rank athletes where the top three scores get 'Gold Medal', 'Silver Medal', 'Bronze Medal', and the rest get their numeric placement. Return the rank.
With what pattern can we solve this problem in loglinear time and linear space ?
Simplify a Unix-style absolute path by eliminating '.', '..', and redundant slashes. Ensure the path starts with '/' and is in its simplest form. Return the canonical path.
With what pattern can we solve this problem in linear time and linear space ?