Block interview question

Memory Allocator Pattern matching in a string