cswork / OAOpen practice workspace

WayfairOA #1

DFS Subsequences of a String (For MLE)

Estimated MediumStatement and editorial — judging is being prepared

Topics (AI-labelled)Partitioning

A DFS probl

Example 1

Input:

s = "abc"

Output:

["a", "ab", "abc", "ac", "b", "bc", "c"]

Explanation: The function should return all possible subsequences of the input string "abc" sorted alphabetically, which are: ["a", "ab", "abc", "ac", "b", "bc", "c"].

Editorial

Loading solution…