Introduction
A binary search tree (BST) is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. A valid BST is a tree in which all the nodes in the left subtree of a node have a value less than the node's value, and all the nodes in the right subtree have a value greater than the node's value. In this challenge, we will determine if a given tree is a valid binary search tree.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
algorithm(("`Algorithm`")) -.-> algorithm/BasicAlgorithmsGroup(["`Basic Algorithms`"])
python(("`Python`")) -.-> python/BasicConceptsGroup(["`Basic Concepts`"])
python(("`Python`")) -.-> python/ControlFlowGroup(["`Control Flow`"])
python(("`Python`")) -.-> python/DataStructuresGroup(["`Data Structures`"])
python(("`Python`")) -.-> python/FunctionsGroup(["`Functions`"])
python(("`Python`")) -.-> python/ModulesandPackagesGroup(["`Modules and Packages`"])
python(("`Python`")) -.-> python/ObjectOrientedProgrammingGroup(["`Object-Oriented Programming`"])
python(("`Python`")) -.-> python/ErrorandExceptionHandlingGroup(["`Error and Exception Handling`"])
python(("`Python`")) -.-> python/PythonStandardLibraryGroup(["`Python Standard Library`"])
algorithm/BasicAlgorithmsGroup -.-> algorithm/graphs_trees("`Graphs Trees`")
algorithm/BasicAlgorithmsGroup -.-> algorithm/recursion_dynamic("`Recursion Dynamic`")
python/BasicConceptsGroup -.-> python/variables_data_types("`Variables and Data Types`")
python/BasicConceptsGroup -.-> python/strings("`Strings`")
python/BasicConceptsGroup -.-> python/booleans("`Booleans`")
python/BasicConceptsGroup -.-> python/type_conversion("`Type Conversion`")
python/ControlFlowGroup -.-> python/conditional_statements("`Conditional Statements`")
python/DataStructuresGroup -.-> python/tuples("`Tuples`")
python/FunctionsGroup -.-> python/function_definition("`Function Definition`")
python/FunctionsGroup -.-> python/default_arguments("`Default Arguments`")
python/ModulesandPackagesGroup -.-> python/importing_modules("`Importing Modules`")
python/ModulesandPackagesGroup -.-> python/standard_libraries("`Common Standard Libraries`")
python/ObjectOrientedProgrammingGroup -.-> python/classes_objects("`Classes and Objects`")
python/ObjectOrientedProgrammingGroup -.-> python/constructor("`Constructor`")
python/ObjectOrientedProgrammingGroup -.-> python/polymorphism("`Polymorphism`")
python/ObjectOrientedProgrammingGroup -.-> python/encapsulation("`Encapsulation`")
python/ErrorandExceptionHandlingGroup -.-> python/raising_exceptions("`Raising Exceptions`")
python/PythonStandardLibraryGroup -.-> python/os_system("`Operating System and System`")
python/FunctionsGroup -.-> python/build_in_functions("`Build-in Functions`")
subgraph Lab Skills
algorithm/graphs_trees -.-> lab-268822{{"`Validating Binary Search Tree`"}}
algorithm/recursion_dynamic -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/variables_data_types -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/strings -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/booleans -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/type_conversion -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/conditional_statements -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/tuples -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/function_definition -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/default_arguments -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/importing_modules -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/standard_libraries -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/classes_objects -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/constructor -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/polymorphism -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/encapsulation -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/raising_exceptions -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/os_system -.-> lab-268822{{"`Validating Binary Search Tree`"}}
python/build_in_functions -.-> lab-268822{{"`Validating Binary Search Tree`"}}
end