Given a sorted array nums, remove duplicate elements in-place to retain only unique values. Return the total 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 ?
Given an absolute path for a Unix-style file system, simplify the absolute path to its canonical path by removing '.', '..', and extra slashes. Return the canonical path.
With what pattern can we solve this problem in linear time and linear space ?