Remove duplicates in a sorted array nums so each unique value appears only once, keeping their order. Return the number 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 ?
Transform a Unix-style absolute path into its canonical form by resolving '.', '..', and combining slashes. Return the canonical path.
With what pattern can we solve this problem in linear time and linear space ?