LightMetrics interview question

Difference between out of memory and stack overflow error.