You are viewing a single comment's thread. Return to all comments →
This one is really bad in c. Not given any starter structures for tree. Not given any input scanning.
Due to this, the best implementation is to just read input and compare the values in order. Allocating memory to put this in a tree would be a waste.
if values are out of order, ret "No".
Seems like cookies are disabled on this browser, please enable them to open this website
Trees: Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
This one is really bad in c. Not given any starter structures for tree. Not given any input scanning.
Due to this, the best implementation is to just read input and compare the values in order. Allocating memory to put this in a tree would be a waste.
if values are out of order, ret "No".