+ 1
Please I need help for code coach!
I am not taking the easy way, I did all of this work on my own. I attempted the "driver license" code coach C# and got 4/5 correct. The input try I got wrong was the 4th and couldn't see what went wrong. https://code.sololearn.com/cVqk9ggEk1TB/?ref=app
2 Antworten
+ 2
This is really neat to see the whole setup simulated as a model!
I think the problem is that you are placing all names into queues before adding your name, even if other names are alphabetically later. That could change which queue your name gets added to, and in turn result in a different number of names waiting before you.
UPDATE:
Later I tested and confirmed that by adding only names which are <= main_name it passes all tests. The change goes in the foreach loop that starts at line 49.
+ 1
If person is in even position say 4th
Agents 2 or even numbr
Output need is 40 but giving 60
Agents 4, must output 20 but giving 40
hope it helps to correct it