very long isNumber solution
largest rect area solution (done by someone else)