Section 2 Flashcards Preview

Computer Science Aqa A Level > Section 2 > Flashcards

Flashcards in Section 2 Deck (15)
Loading flashcards...
1

What is the difference between a static data structure and a dynamic one, and give an example of both

static is fixed in size(array) and a dynamic one changes in size (tree, list, stack, queue)

2

what advantage is there of a static data structure

faster

3

What is FIFO and what is LIFO

First in first out
Last in first out

4

What is a data strucutre

A way of storing data so that it can be used efficiently

5

what is an array

a data structure that has numerous elements, usually of the same type, that are identified by an index

6

What is a 2D array?

An array is an indexed set of elements. If each element is itself an array

7

What does the pop operation do in a stack

returns the most recent element added to the stack and removes it from the stack

8

What does the push operation in a stack

adds an element to the top of the stack

9

What does the peep operation in a stack

returnsreturns the most recent element added to the stack but keeps it on the stack

10

what is the difference between a graph and a tree

a graph has a loop or a cycle

11

what is a dictionary

an abstract data type that has key: value pairs.

12

What makes a tree a "binary tree"

Each node has a maximum or 2 children

13

what is a lead of a tree

a node that has no children

14

what is the root of a tree

a node that is considered the root and every element is directed away from it

15

what makes a tree an ordered binary tree

each item on the left or a node should be lower than the value in that node