{"id":"two-stack-queue-amortized-via-lazy-transfer","text":"The two-stack queue achieves correct FIFO semantics with amortized O(1) per operation through lazy bulk transfer: each element crosses from input to output stack exactly once across its lifetime, push is worst-case O(1) (never triggers transfer), and the deferred reversal preserves total ordering.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["two-stack-queue-amortized-o1","two-stack-queue-lazy-transfer","two-stack-queue-push-always-o1"],"outlist":[],"label":"Three properties of the two-stack queue collectively prove amortized O(1) via the lazy-transfer mechanism"}],"dependents":[],"metadata":{"source_type":"derived","last_reviewed":"2026-06-07T22:02:22","review_result":"pass"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"two-stack-queue-amortized-via-lazy-transfer","truth_value":"IN","reason":"SL justification valid","antecedents":["two-stack-queue-amortized-o1","two-stack-queue-lazy-transfer","two-stack-queue-push-always-o1"],"label":"Three properties of the two-stack queue collectively prove amortized O(1) via the lazy-transfer mechanism"},{"node":"two-stack-queue-amortized-o1","truth_value":"IN","reason":"premise"},{"node":"two-stack-queue-lazy-transfer","truth_value":"IN","reason":"premise"},{"node":"two-stack-queue-push-always-o1","truth_value":"IN","reason":"premise"}]}}