Question: statement: Rocky is a software engineer and he is creating his own operating system called myFirst os. myFirst os is a GUI (Graphical user interface)

statement: Rocky is a software engineer and he is creating his own operating system called "myFirst os". myFirst os is a GUI (Graphical user interface) based operating system where everything is stored in files and folders. He is facing issues on creating unique folder names for the operating system. Help rocky to create the unique folder name for it's os.If folder name already exists in the system and integer number is added at the name to make it unique. The integer added starts with 1 and is incremented by 1 for each new request of an existing folder name. Given a list of folder names, process all requests and return an array of corresponding folder names. Example n=5 foldername= ['home', 'myfirst","downloads', 'myfirst', 'myfirst] Foldername[0] = 'home' is unique. Foldername[1] = 'myfirst' is unique. foldername [2] ='downloads' is unique. Foldemame[3] = 'myfirst' already exists in our system. So Add1 at the end of the folder name i.e foldername[3] ="myfirst1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!