Group Group Group Group Group Group Group Group Group

Binary Tree test case . swift not connecting properly

Hello,

I’m currently trying to print my basic binary tree on the binaryTreeTestCase.swift which I downloaded from the site. I followed the video and my code run without error but, my functions don’t seem to print output in the console. for test_visualizeBianryTree.

I’m watching video 11 of data Structures and Algorithms in Swift - Trees and binary trees. In the video at 3:09 I don’t see any output like shown in the video.

Seems like I need first test to work in order to test the following algorithms ahhhhhh!

Is there a solution available to compare with my code

Hi @davidrandolph,
One way is to share your code or snips on here and the community or sme’s can help you fix it.

cheers,

Seems you have forgotten that your deserialize(_:slight_smile: is destructive for its parameter… Please remember why you need &.

//Re-load a1 & a2…
a1 = [1,nil,2,3]
a2 = [1,nil,2,nil,3]
print(isSameTree(deserialize(&a1), deserialize(&a2))) //-> false
print(isSameTree(a3, a4)) //-> false