Minimum Policy Flips in a Binary Expression Tree
A policy engine stores a Boolean expression in a binary tree. A leaf is a literal: `0` means false and `1` means true. An internal node is an operator: `2` means OR, `3` means AND, `4` means XOR, and `5` means NOT. NOT uses its left child and has no right child.