interviewing.io practice - Largest subsequence of length K from a string of numbers
Anonymous User
2571

Given a positive integer represented as a string, and an integer K, find the largest subsequence of length K that you can form from the given string.

Input: "3141592", K = 4
Output: "4592"

Input: "3141592", K = 3
Output: "592"

Comments (12)