← 返回 ibm 的题目列表Find the Largest Subset of a String
类型:online_judge
Given a string, find the largest subset of it. The subset is defined as a sequence that can be derived by deleting some characters from the string without changing the order of the remaining characters. Please write a program to achieve this.
Requirements:
Input: A string s containing only lowercase letters.
Output: A largest subset of the string.
Constraints:
1 <= s.length <= 10^5
Example:
Input: abcabc
Output: abc
Example
Input
abcabc