Leetcode 1487: Making File Names Unique

Problem statement

Solution

  1. Maintain next map String to Integer that stores the next smallest (potential) positive number to use for the particular String key.
  2. Maintain a set of…

--

--

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