Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

11 Problem statement: Rocky is a software engineer and he is creating his own operating system called myFirst os. myFirst os is a GUI (Graphical

11 Problem 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. W n=5 foldername= ['home', 'myfirst' ,downloads', 'myfirst', 'myfirst] Foldername[0] = 'home' is unique. Foldername[1] = 'myfirst' is unique. foldername [2] ='downloads' is unique. Foldername[3] = 'myfirst' already exists in our system. So Add1 at the end of the folder name i.e foldername[3] ="myfirst1" . Folder

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Image Databases Towards Advanced Image Retrieval

Authors: Yihong Gong

1st Edition

1461375037, 978-1461375036

More Books

Students also viewed these Databases questions