Sequences + Recursion | Stacks and Queues Flashcards

1
Q

What are sequences

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

What is the recursive definition of sequences?

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

What is the non-recursive definition of sequences?

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

What is proof by induction?

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

What are the 3 rules of recursive functions?

A
  • Must have base case
  • Must call itself recursively
  • Must change its state and move towards the base case
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are data structures?

A
  • Data elements are arranged sequentially OR linearly
  • Elements are attaches to its previous and next adjacent
  • Single run = traverse all elements
  • Easy to implement → computer memory is in a linear arrangment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are stacks

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

What are the uses of stacks?

A
  • LIFO
  • Expression evaluation
  • String reversal
  • Calculating REVERSE POLISH NOTATIONS
  • Compilers - syntax evaluation
  • Recursion
  • Redo/Undo features
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are queues?

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

What are the uses of queues?

A
  • FIFO
  • Printer queues
  • Email/Message Queues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly