Interview Question

Quality Assurance Engineer Interview(Student Candidate) Toronto, ON (Canada)

What is the

difference between a link list and a double link list and what is the difference between a stack and a heap?
Answer

Interview Answer

1 Answer

0

A link list has 1 pointer point to the next. The Double link list has 2 pointers, one point to the Next and one point to the previous (its neighbors).
Memory in stack will be clear when exit the function and memory automatic de-allocate while the Heap is a memory will store in memory as long as user de-allocate it i.e. malloc and free. Stack is smaller in size, but faster than Heap.

Dominator on Sep 2, 2013

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up