Aloha3 | Subdirectories
commands given are :
dir
mkdir xxx
up
cd xxxdir : sort folders and print in left intended, 9 spaced, 10 liner output. Also print current folder path
mkdir : 6 letters, A-Za-z0-9 and _ | if present print error message
uo : no extra fields after UP | if none, print error message
cd : folder name should be presnet | else print error message
Question was very easy. I underestimated the easiness no time to test at the end. Sent the solution to the rectuiter (it was accepted). Got email couple of days later that rejected.
Pain points: Sorting - there might be diectories with numbers in between
Initial test fail reason:
Question initially said that first input will be the number of test cases. I expected a number there. But the solution has some built in code that takes it up and give the solution function just the commands. This should have been specified in the question. For my example it mentioned 20 lines but I received only 18.
Debugging is difficult. I sent the well tested code back to them 30 mints later.
Retrospective: If you get this question, try to run throught the code and test it well. The time was 2 hours but it passes too fast. Debugging is very difficult with hacker rank. Atleast 30 min needed for testing.