data structures Flashcards

1
Q

Tell me about stacks.

A

Last In First Out, Push Pop, you can only access values by ‘pushing’ to the top and ‘popping’ off the top of the stack.

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

How can you use a stack to solve whether these braces are balanced?

‘(([{{()}}])’

A

you can pop each brace off and if ‘(([{{( === )}}])’ then true.

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

Tell me about Queues

A

FIFO, enqueue, dequeue. You can enqueue to the back and dequeue from the front.
1

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

Linked Lists.

A

You can only access the first index of a linked list.
You have to work from front to back
They are a pain in the ass

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