Algorithm · Google · Hard
This set contains three main coding tasks plus one follow-up on the string task. For each part you should discuss tradeoffs where asked, then provide a concrete implementation. Part 1: Implement Quickselect Given an integer collection nums and a 1-based rank k, produce the value at rank k after arranging the values in ascending order. Equal values count as separate entries. If nums is empty, or if k is not in the range $$1 \le k \le \text{len}(nums)$$, answer -1. Talk…
Checking your access…