Back to marketplace

Data Structures

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What are data structures

Back (Answer)

Data structures is a format used to store , organise, modify and access data

#2
Front (Question)

What are the features of an array

Back (Answer)

An indexed set of related elements Must be finite and indexed An array often start from zero Must only contain elements with the same data type

#3
Front (Question)

what are Queues how can they be used

Back (Answer)

FIFO ( First item added is the first to be removed ) Used in keyboard buffers and breadth first search algorithm

#4
Front (Question)

Liner queues

Back (Answer)

It has two pointers ( front and rear) IsEmpty , IsFull , Enqueue and Dequeue

#5
Front (Question)

How can emptiness in a queue be detected

Back (Answer)

By comparing the front and rear pointers

#6
Front (Question)

Why is a circular queue better than a linear queue

Back (Answer)

It is more memory efficient

#7
Front (Question)

What is a circular queue

Back (Answer)

A type of queue where the front and rear pointers can move over the two ends of the queue

#8
Front (Question)

What are priority queues

Back (Answer)

Items are assigned a priority High priority items are dequeued first before lower priority items

#9
Front (Question)

What happens when two or more items have the same priority

Back (Answer)

Items are removed in first in first out

#10
Front (Question)

What are the features of stacks

Back (Answer)

It has a pointer Push Pop Peek IsFull and IsEmpty

#11
Front (Question)

What happens when a push command is executed on a full stack

Back (Answer)

A stack overflow is thrown

#12
Front (Question)

What happens when you use the pop command on an empty stack

Back (Answer)

Stack underflow

#13
Front (Question)

When can a graph be used

Back (Answer)

Can be used to represent networks such as transport networks, IT networks and the Internet.

#14
Front (Question)

What does a graph consist of

Back (Answer)

Consists of nodes (sometimes called vertices) joined by edges (sometimes called arcs)

#15
Front (Question)

What is a weighted graph

Back (Answer)

A weighted graph is one in which edges are assigned a value

#16
Front (Question)

What are the ways a graph can be represented as

Back (Answer)

○ Adjacency matrices ○ Adjacency lists

#17
Front (Question)

What is a adjacency matrices

Back (Answer)

● A tabular representation of a graph ● Each of the nodes in the graph is assigned both a row and a column

#18
Front (Question)

What is a adjacency lists

Back (Answer)

● Represent a graph using a list ● For each node, a list of adjacent nodes is created ● Only records existing connections in a graph

#19
Front (Question)

What is the difference adjacency matrix ad an adjacency list

Back (Answer)

Adjacency matrix Stores every possible edge between nodes, even those that don’t exist. Almost half of the matrix is repeated data. Memory inefficient Allows a specific edge to be queried very quickly, as it can be looked up by its row and column. Time efficient. Well suited for dense graphs where there are a large number of edges Adjacency list Only stores the edges that exist in the graph. Memory efficient. Slow to query, as each item in a list must be searched sequentially until the desired edge is found. Time inefficient. Well suited to sparse graphs, where there are few edges.

#20
Front (Question)

What are trees

Back (Answer)

They are connected , undirected with no cycles

#21
Front (Question)

What are rooted trees

Back (Answer)

● The root node is the only node with no parent, all other roots stem from them

#22
Front (Question)

What is a leaf node

Back (Answer)

child nodes with no children

#23
Front (Question)

What is a binary node

Back (Answer)

A rooted tree in which each parent node has no more than two child nodes.

#24
Front (Question)

What are hash tables

Back (Answer)

A hashing algorithm takes an input and returns a hash.A hash table stores key-value pairs