We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hi, your solution is very neat. I like it. And do you have any second thought on handing one node tree. You didn't actually put anything into values[] and colors[] yet.
/* Handle 1-node tree */if(numNodes==1){returnnewTreeLeaf(values[0],colors[0],0);}
Java Visitor Pattern
You are viewing a single comment's thread. Return to all comments →
Hi, your solution is very neat. I like it. And do you have any second thought on handing one node tree. You didn't actually put anything into values[] and colors[] yet.
Maybe you mean