Amazon interview question

recursive file structure coding question