Spot the Pattern

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 ?

Dissect the Code

Given an array score, assign ranks to athletes such that the highest score gets 'Gold Medal', second highest 'Silver Medal', third 'Bronze Medal', and others receive numeric ranks. Return the rank.

With what pattern can we solve this problem in loglinear time and linear space ?

Conquer the Task

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 ?