Skip to content

Property Invariants

DhruvP-23 edited this page Apr 16, 2024 · 5 revisions

An invariant is a property that is always true.

An Example is: Binary Search Tree (BST) Property

for All Nodes u :

  • all data in u.L < u.x
  • all data in u.R > u.x where u.L is the left subtree, u.R is the right subtree, u.x is the data in u

Clone this wiki locally