I like Ruby's wordy style.
can this pass the test?In that case ,I'll spare my time to learn something about Ruby.
Yes, it passes. Why would I post something as a solution if it didn't? You could've also just tried it...
Ruby is fun, I definitely recommend learning it :-)
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.