Back to marketplace

(P1) Fundamentals of Algorithms

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 is graph traversal?

Back (Answer)

The process of visiting each vertex in a graph.

#2
Front (Question)

What are the two graph traversals?

Back (Answer)

Depth-first and breadth-first.

#3
Front (Question)

Describe depth-first traversal.

Back (Answer)

A branch is fully explored before backtracking. Uses a stack and is used navigating mazes.

#4
Front (Question)

Describe breadth-first traversal.

Back (Answer)

A node is fully explored before venturing on the next node. Uses a queue. Used for determining the shortest path on an unweighted graph.

#5
Front (Question)

What is an algorithm?

Back (Answer)

A set of instructions which completes a task in a finite time and always terminates.

#6
Front (Question)

What is a tree?

Back (Answer)

A connected acyclic graph.

#7
Front (Question)

Describe tree traversal.

Back (Answer)

Process of visiting each node in a tree. Unique to trees and must start at the root.

#8
Front (Question)

Where should the dot be drawn for a pre-order traversal?

Back (Answer)

Left.

#9
Front (Question)

Where should the dot be drawn for a in-order traversal?

Back (Answer)

Bottom.

#10
Front (Question)

Where should the dot be drawn for a post-order traversal?

Back (Answer)

Right.

#11
Front (Question)

What can pre-order traversal be used for?

Back (Answer)

Copying trees.

#12
Front (Question)

What can an in-order traversal be used for?

Back (Answer)

Used in binary trees to outputs the contents of a binary tree in ascending order.

#13
Front (Question)

What can post-order traversals be used for?

Back (Answer)

Infix to RPN conversions. Producing a postfix expression from an expression tree. Emptying a tree.

#14
Front (Question)

How are Infix to RPN and binary trees related?

Back (Answer)

Infix to RPN involve the making and traversing of a binary tree.

#15
Front (Question)

What is an opcode?

Back (Answer)

An operator.

#16
Front (Question)

What is an operand?

Back (Answer)

Data which is applied to the operator.

#17
Front (Question)

When creating an expression tree, what should always be the parent node and the child nodes?

Back (Answer)

Parents should be the opcode. Children should be the operands.

#18
Front (Question)

What is produced from performing an in-order traversal on an expression tree?

Back (Answer)

Infix expression.

#19
Front (Question)

What is produced from performing an post-order traversal on an expression tree?

Back (Answer)

Postfix expression.

#20
Front (Question)

How do you work out a postfix expression?

Back (Answer)

Perform the calculation of the opcode and only the two preceding operands and put back into expression. Repeat.

#21
Front (Question)

What notation do humans use?

Back (Answer)

Infix notation.

#22
Front (Question)

What does RPN stand for?

Back (Answer)

Reverse Polish Notation.

#23
Front (Question)

What is RPN?

Back (Answer)

A postfix way of writing expressions. Eliminates need for brackets and any confusion of the order of execution. Opcode is written after the operands.

#24
Front (Question)

What data structure can be used to evaluate postfix equations?

Back (Answer)

Stacks.