MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/o3fan0/check_if_binary_tree_is_balanced/h2fa0pw/?context=3
r/badcode • u/MrPancholi • Jun 19 '21
44 comments sorted by
View all comments
123
Frankly, LGTM. Not hard to understand, variables with somewhat decent names, and no blatant optimizations to be seen.
22 u/SuitableDragonfly Jun 20 '21 Me too. I was sitting here wondering if I was just really stupid to not see how this is bad. 5 u/paulsmithkc 👨🏫 Jun 20 '21 This looks like awesome code to me. Well documented, good variable names, super easy to read, easy to test, and sufficiently optimized.This is a great example of where tuples work well, and how to use them in a recursive function.High five to whoever wrote the code, I'm sure they'd be be a great team member to have.
22
Me too. I was sitting here wondering if I was just really stupid to not see how this is bad.
5 u/paulsmithkc 👨🏫 Jun 20 '21 This looks like awesome code to me. Well documented, good variable names, super easy to read, easy to test, and sufficiently optimized.This is a great example of where tuples work well, and how to use them in a recursive function.High five to whoever wrote the code, I'm sure they'd be be a great team member to have.
5
This looks like awesome code to me. Well documented, good variable names, super easy to read, easy to test, and sufficiently optimized.
This is a great example of where tuples work well, and how to use them in a recursive function.
High five to whoever wrote the code, I'm sure they'd be be a great team member to have.
123
u/pedro823 Jun 19 '21
Frankly, LGTM. Not hard to understand, variables with somewhat decent names, and no blatant optimizations to be seen.