I think the quote from the interviewer summarizes it best.
"Normally people write it in Java and it takes them a while and it takes up a lot more space on the whiteboard. They spend a lot of time manipulating the input string."
If you're more comfortable with Ruby, it would also be a great alternative. Clean, readable code. You get to focus on solving the problem.
"Normally people write it in Java and it takes them a while and it takes up a lot more space on the whiteboard. They spend a lot of time manipulating the input string."
If you're more comfortable with Ruby, it would also be a great alternative. Clean, readable code. You get to focus on solving the problem.