Change the resize check from "count > size" to "count >= size" to avoid a potential infinite loop with high load factors and a full hash table.