A public contest lets users submit inputs to a grading program. Algorithm A uses a hash table with excellent average performance but no protection against adversarial collisions. Algorithm B uses a balanced tree with O(log n) worst-case operations. Which is preferable if worst-case reliability is required?