RemoteState interview question

a data structures & algorithms coding problem (arrays, strings, recursion, DP), and sometimes they push further by asking for optimization or alternate approaches.