Computer Science, asked by TbiaSamishta, 10 months ago

TIME:00:28/03:00:00 Submit Code Problem Statement Swaggy strings (100 Marks) Raju has a lot of strings but he does not like all of them.He likes only Swaggy strings. Now Raju wants to find the Swaggy String S from the given string N. A Swaggy string S has the following properties- It must be lexicographically largest. It must be a subsequence of original string N. Every character in S must appear at least K times. Input Format First line of input contains a String N. Second Line contains an Integer K. Note- All Characters in String N will be from (a-z) in lowercase. Constraints (1<=|N|<=100000) (1<=K<=100000) Output Format You must return a single String which is Swaggy. Sample TestCase 1 Input ritik 1 Output tk

Answers

Answered by Sidyandex
0

This is a Stata reading where strings are used instead of numbers.

It may allow its elements to be mutated and the length changed, or it may be fixed after the production.

A string is generally a kind of data type and is often implemented as an array data structure of bytes or words that stores a typically characters, sequence of elements, using some character encoding.

Similar questions