Solve the Code Riddle

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 ?

Decode the Logic

You are given a score array representing athletes' scores. Rank them such that the highest gets 'Gold Medal', second 'Silver Medal', third 'Bronze Medal', and the rest get their positions. Return the rank.

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

Spot the Pattern

Convert a Unix-style absolute path into its simplest form by handling '.', '..', and multiple slashes. Return the canonical path.

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