Google OA 2022
Anonymous User
839

This was the second question. I was not able to do this one.
The question was as follows
Given string of length n find alphabetically largest subsequence of length i for each i between 1 to n. [NOTE: subsequence, not subarray]
Example:
s = "hrw"

ans = ["w","rw","hrw"]

I don't exactly remember the constraints, but I guess n was around 1000.
How to do this problem?
Thanks

Comments (5)