It relationships is known as a recurrence family since form
struct Tree < int>>; bool ValsLess(Tree * t, int val) // post: return true if and only if all values in t are less than val
Simply B, pupils was expected to enter IsBST using ValsLess and assuming that an identical setting ValsGreater can be obtained. The answer was shown less than:
bool IsBST(Tree * t) // postcondition: returns true if t represents a binary search // tree containing no duplicate values; // otherwise, returns false. ...
Weiterlesen