Tesla Interview Question

Coding the memcpy function with overlap detection