A Tree Problem...

Revision en1, by wish_me, 2017-09-04 21:59:34

Given a binary tree return a matrix where mat(i,j) is 1 when i is an ancestor of j. only one traversal required and no extra space required,

Tags #trees

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English wish_me 2017-09-04 21:59:34 158 Initial revision (published)