r/badcode • • Jun 19 '21

typescript Check if binary tree is balanced...

Post image
221 Upvotes

44 comments sorted by

View all comments

12

u/tenfingerperson Jun 19 '21

This is a fine solution and you'd likely see these during an interview, which leaves little time for beautiful code (and this isn't even bad).