Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.
This project is maintained by chankruze
You have to get a new driver’s license and you show up at the office at the same time as 4 other people. The office says that they will see everyone in alphabetical order and it takes 20 minutes for them to process each new license. All of the agents are available now, and they can each see one customer at a time. How long will it take for you to walk out of the office with your new license?
Given everyone’s name that showed up at the same time, determine how long it will take to get your new license.
Your input will be a string of your name, then an integer of the number of available agents, and lastly a string of the other four names separated by spaces.
You will output an integer of the number of minutes that it will take to get your license.
'Eric'
2
'Adam Caroline Rebecca Frank'
40
It will take 40 minutes to get your license because you are in the second group of two to be seen by one of the two available agents.
Language | Solution |
---|---|
C | not available |
CPP | not available |
C# | not available |
Python | available |
Java | not available |
Ruby | not available |
Swift | not available |