← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given a string s, delete exactly one character (any single character), then generate and return the set of all distinct non-empty subsequences of the resulting string. A subsequence is obtained by deleting zero or more characters without changing the order of the remaining characters. Because different deletions can yield the same subsequence, you must deduplicate the final collection. Return the sorted list (or set) of these distinct subsequences in any order the interviewer specifies.