List And Pointer Flashcards Preview

Computing > List And Pointer > Flashcards

Flashcards in List And Pointer Deck (7)
Loading flashcards...
0
Q

What are the disadvantages of linear list/array

A

Memory locations may be wasted.
Insertion of an element within an ordered list required moving elements.
Deletion of an element within a list requires moving elements

1
Q

What are the advantage of an array/linear list

A

It’s easy to program

If elements are stored in key order, a binary search is possible

2
Q

What are pointers?

A

A pointer is a variable that contains an address. A pointer points to the memory location with that address.

3
Q

What’s an heap?

A

The memory locations available to application program for dynamic allocation

4
Q

What’s a “dynamic allocation”?

A

A dynamic allocation: memory space is only allocated when required at run time

5
Q

What are advantages of the heap?

A

More efficient use of memory when dealing with data of unknown and changing size

6
Q

What’s a dynamic structure

A

The amount of memory taken up can vary at run time