Thoughtworks interview question

Password validation program