2.3.1 - Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Stack data structure: concept and application

A

LIFO
Web address stacks
Stack memory (Call stack)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Queue data structure: concept and application

A

FIFO
Printing queues
Multi-level feedback queues

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Binary tree data structure: concept and application

A

Root at the top - branches as links - leaves as last nodes
Folder structures (Hierarchical data)
Manipulating sorted lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Linked lists: concept and application

A

dynamic data structure
non-contiguous memory allocation
each node holds a pointer to the next

Symbol table creation
linked allocation of files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Name and explain all traversal algorithms

A

Pre-order/depth-first = data, left, right
in-order = left, data, right
post-order = left, right, data
breadth first = visit each neighbour using queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Two rules of Big o notation

A
  1. Remove all terms except the one with the largest factor or exponent
  2. Remove any constants
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain O(1) notation

A

Constant complexity

Executes the same amount of time regardless of inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain O(log n)

A

Logarithmic
Halves the data in each path
Opposite to exponential

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain O(n) notation

A

Linear complexity

Performance declines as data set grows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain O(n^2) notation

A

Polynomial complexity
Performance is proportional to the square of the size of the data set
(Nested iterations)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain O(2^N) notation

A

Exponential complexity
Doubles with each addition to the data set
Opposite to logarithmic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly