LightMetrics Interview Question

Difference between out of memory and stack overflow error.