Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The description clearly states the second example is a valid BST which it isn't or am I incorrect in that statement?
Furthermore,
' you will write a function that will validate that a given binary tree is a binary search tree. '
please provide a reference to a binary search tree definition that states a reverse order is a valid binary search tree.
Second Example is NOT A VALID BST! and the corresponding test is incorrect
by definition, valid BST's have the following properties :
Although the tree traversal meant to be used here is not inherently a BST property, its output is, which is the key to the solution.
what is incorrect? can you elaborate?
Incorrect.
this is not a BST problem. it is a general BT problem. why put a misleading title?
C++ translation
Please, review and (hopefully) approve.
AWSOME ONE, MUCH BETTER THAN THE LEECODE VERSION! THE AUTHOR IS ABSOLUTE A GENIUS!
Done ;-)
Fortran 2008 should be enabled...
It seems to me that random tests occasionally include duplicate numbers what is explicitly mentioned in the task description as not happening... :-(
I feel like the most common definition of a BST has all of the left nodes <= the root node and all right nodes > the root node (ascending order). Allowing descending order BSTs is a nice twist but I think it should be mentioned in the instructions.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...