Microsoft interview question

Design and code malloc().