Say Hello to Pramp

Small example of window sliding

Given an array of unique characters arr and a string str, Implement a function getShortestUniqueSubstring that finds the smallest substring of str containing in arr. Return “ ”(empty string) if such a substring doesn’t exist. Come up with an asymptotically optimal solution and analyze the time and space complexities

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store