Binary search tree validation: Given a binary tree in zero-based heap-indexed level order, return whether it is a strict binary search tree. Null entries represent missing nodes and duplicate values are invalid.
Input: A JSON object { "tree": (number|null)[] }.
Output: A JSON boolean.
Constraints:
- 0 <= tree.length <= 100000
- Every non-null value is a safe integer
- The BST rule applies against all ancestors, not only the parent
Read one JSON value from stdin and print exactly one JSON-serialized answer to stdout with no extra text.
Difficulty: EASY. Variant: 22. Balance correctness, maintainability, and clear review-ready code.
Practice context
This coding (algo) exercise trains prompt interpretation, explicit assumptions, a concrete response, and a concise explanation of the decisions made. It is marked easy difficulty.
The signed-in workspace provides the tools required b