Skip to content

Conversation

@waqarsaleem
Copy link

Leverages __iter__ to iterate over the trees and zip to get corresponding pairs. zip is lazy so there is no wasted computation. zip_longest from itertools is used in case one tree is larger than the other. Checking will terminate at the first non-matching node.

I am very new to contributing so please feel free to point out any errors I made.

@codecov-io
Copy link

Codecov Report

Merging #32 (fd51e3f) into main (d53a4b2) will decrease coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## main #32 +/- ## =========================================== - Coverage 100.00% 99.84% -0.16%  =========================================== Files 2 2 Lines 636 627 -9 =========================================== - Hits 636 626 -10  - Misses 0 1 +1 
Impacted Files Coverage Δ
binarytree/__init__.py 99.83% <100.00%> (-0.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d53a4b2...fd51e3f. Read the comment docs.

@waqarsaleem waqarsaleem closed this Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants