learn.dev42.co.uk

Data Structure

Stacks

First in last out, creates a stack where only the last one can be taken out and viewed Push() Pop() Peek() ISfull() Isempty()

Queues

they use first in first out so the first thing added will be the first to be pulled out (FIFO) Peek() size() isFull isEmpty

there are 3 diferent types: Enqueue - add new items to back Dequeue - remove items from front Peek - view the front item first

Hash tables

data stored in pairs, one of which is a key

vectors

NUMBERS? often a 1D array of data like coordinates and direction

Graphs

a way of representing how data links together

Nodes: represents entities Link/edge): relationship connections Directed Graph: Edges have a direction(arrow) Undirected Graph: Edges have no direction(no arrow) Weighted Graph: Edges have values

Tree

used to represent data and find orders

use a list of data and if the first one is bigger than the left one then put that to the left. do this with all the data to create the graph.