Fundamentals of Algorithms

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:38 AM on 4/25/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

What is a depth first traversal

Depth first traversal is a method for exploring tree or graph data structures where the algorithm starts at the root (or an arbitrary node) and explores as far as possible along each branch before backtracking.

2
New cards

How is a depth first traversal implemented

Using a stack

3
New cards

What is a breadth first traversal

Breadth first traversal is a method for exploring tree or graph data structures where the algorithm starts at the root (or an arbitrary node) and explores all of its neighbors before moving on to the next level of nodes.

4
New cards

How is a breadth-first traversal implemented

Using a queue

5
New cards

Pre-order traversal

Draw an outline around the tree structure. As you pass the left of a node, output the data in that node.

6
New cards

Where is a pre-order traversal used

generating prefix expressions used in functional programming languages.
Or copying a tree.

7
New cards

In-order traversal

Draw an outline around the tree structure. As you pass underneath a node output the data.

8
New cards

What is the use of an in-order traversal

outputting the contents of a binary search tree in ascending order .

9
New cards

Post-order traversal

Draw an outline around the tree structure. As you pass to the right of the node output the data in that node.

10
New cards

Use of a post-order traversal

Infix to RPN (Reverse Polish Notation) conversions, producing a postfix expression from an expression tree, emptying a tree.

11
New cards

How do you convert from infix to Reverse Polish (postfix) notation

Add brackets to establish operator precedence and then apply post-order traversal to record the expression.

12
New cards

Order of precedence (increasing order)

=
(
+-)
* /
^
~

13
New cards

How does a computer convert from infix to RPN

A process that involves the use of an expression tree to establish operator precedence, followed by a post-order traversal to generate the corresponding postfix notation.

14
New cards

How do you evaluate a RPN expression

You use a stack data structure to process the expression from left to right, pushing operands onto the stack and popping them for calculations whenever an operator is encountered.

15
New cards

Time complexity of a linear search

O(n)

16
New cards

Time complexity of a binary search

O(log n)

17
New cards

Time complexity of a bubble sort

O(n2)

18
New cards

Time complexity for a merge sort

O(n log n)

19
New cards

What is dijkstras shortest path algorithm

a graph algorithm that finds the shortest path from a source vertex to all other vertices in a weighted graph.

20
New cards

How does Dijkstra's shortest path algorithm work

It uses a priority queue to explore the graph by continually selecting the vertex with the smallest tentative distance.

Explore top notes

note
Extinctions, Anomaly, and a Crater
Updated 1211d ago
0.0(0)
note
Conformity
Updated 1036d ago
0.0(0)
note
Chapter 8: Rotational Kinematics
Updated 719d ago
0.0(0)
note
Chapter 28: Forensic Psychiatry
Updated 1086d ago
0.0(0)
note
DNA Replication
Updated 1203d ago
0.0(0)
note
Institutional Review Boards
Updated 1406d ago
0.0(0)
note
Extinctions, Anomaly, and a Crater
Updated 1211d ago
0.0(0)
note
Conformity
Updated 1036d ago
0.0(0)
note
Chapter 8: Rotational Kinematics
Updated 719d ago
0.0(0)
note
Chapter 28: Forensic Psychiatry
Updated 1086d ago
0.0(0)
note
DNA Replication
Updated 1203d ago
0.0(0)
note
Institutional Review Boards
Updated 1406d ago
0.0(0)

Explore top flashcards

flashcards
OMM Final Exam Terms
42
Updated 1218d ago
0.0(0)
flashcards
2nd-Quarter-Notes-and-Reviewer
38
Updated 804d ago
0.0(0)
flashcards
Zoology Exam 2
147
Updated 474d ago
0.0(0)
flashcards
Spanish I - Actividades
34
Updated 855d ago
0.0(0)
flashcards
Plant Systems
33
Updated 1162d ago
0.0(0)
flashcards
APHUG Unit 4 Vocab
57
Updated 1119d ago
0.0(0)
flashcards
Reflexives and Body Parts
55
Updated 1123d ago
0.0(0)
flashcards
#1/6
31
Updated 102d ago
0.0(0)
flashcards
OMM Final Exam Terms
42
Updated 1218d ago
0.0(0)
flashcards
2nd-Quarter-Notes-and-Reviewer
38
Updated 804d ago
0.0(0)
flashcards
Zoology Exam 2
147
Updated 474d ago
0.0(0)
flashcards
Spanish I - Actividades
34
Updated 855d ago
0.0(0)
flashcards
Plant Systems
33
Updated 1162d ago
0.0(0)
flashcards
APHUG Unit 4 Vocab
57
Updated 1119d ago
0.0(0)
flashcards
Reflexives and Body Parts
55
Updated 1123d ago
0.0(0)
flashcards
#1/6
31
Updated 102d ago
0.0(0)