Fractal Analytics | SDE | 10 November 2019

Question · Posted Apr 2020

Given a string you need to print longest possible substring that has exactly M unique characters. If there are more than one substring of longest possible length, then print the one that occurs first. Word - Wedding , k=0 Output - dd Constraints: 1 < word < 10^6 0 < k < 25

The full answer & interview discussion are available to premium members.

Log in Create a free account