Implement a memory allocator with malloc/free | OpenAI Interview Question