String Deduplication with Window Size

Given a string and an integer window size, remove duplicate characters so that each character appears only once. Return the new string. In the sliding window, move the window by its size each time. Te...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: