Section 2 Flashcards Preview

Computer Science Aqa A Level > Section 2 > Flashcards

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

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)


what advantage is there of a static data structure



What is FIFO and what is LIFO

First in first out
Last in first out


What is a data strucutre

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


what is an array

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


What is a 2D array?

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


What does the pop operation do in a stack

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


What does the push operation in a stack

adds an element to the top of the stack


What does the peep operation in a stack

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


what is the difference between a graph and a tree

a graph has a loop or a cycle


what is a dictionary

an abstract data type that has key: value pairs.


What makes a tree a "binary tree"

Each node has a maximum or 2 children


what is a lead of a tree

a node that has no children


what is the root of a tree

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


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