A Game of Strings
Pandit is playing a game of strings. As it is well known that he isn’t very bright. So he needs your help in winning this game.
The game is very simple. You are given a string S of length N and an integer K. You have to print first K occurences(if for any character count < K then print them all) of every character in the given order.
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlinesOrder Paper Now
First line contains T, number of testcases.
First line of each testcase contains 2 integers N and K.
Second line contains the string S, comprising of only lowercase alphabets.
Print the required string.
Write a java program for this….///