MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/o3fan0/check_if_binary_tree_is_balanced/h2cd2m9/?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.
-62 u/MrPancholi Jun 19 '21 It does work, but I just thought that the tuple thing I did was a little weird.I suck with algorithms so I though this was pretty far form the ideal solution. 69 u/dliwespf Jun 19 '21 Since this seems to be your own code: Don't shame yourself, your code is quite alright.And additionally: You seem to try to improve your own coding style. So in my opinion you are doing well!
-62
It does work, but I just thought that the tuple thing I did was a little weird.I suck with algorithms so I though this was pretty far form the ideal solution.
It does work, but I just thought that the tuple thing I did was a little weird.
I suck with algorithms so I though this was pretty far form the ideal solution.
69 u/dliwespf Jun 19 '21 Since this seems to be your own code: Don't shame yourself, your code is quite alright.And additionally: You seem to try to improve your own coding style. So in my opinion you are doing well!
69
Since this seems to be your own code: Don't shame yourself, your code is quite alright.
And additionally: You seem to try to improve your own coding style. So in my opinion you are doing well!
123
u/pedro823 Jun 19 '21
Frankly, LGTM. Not hard to understand, variables with somewhat decent names, and no blatant optimizations to be seen.