• Member for 7 years, 9 months
  • Last seen more than 1 year ago
Preorder traversal of binary tree to produce formatted string
4 votes

I haven't fully parsed your code, but I would definitely add a check before creating the root. This get(0) would break on an empty list, and would break on a null list. Or you could throw an ...

View answer
Given a Perfect Binary Tree, reverse the alternate level nodes of the binary tree
3 votes

Documentation The first thing that comes to my mind is your doc sentences like this one: Constructs a binary tree in order of elements in an array. Rather than an array, I'd be more specific and ...

View answer