Data Structures Flashcards

1
Q

Explain a queue data structure

A

A queue is a simple data structure that allows elements to be inserted from one end, called the rear (also called tail), and deleted from the other end, called the front (also called head).
This behavior is called FIFO (First in First Out). A very important concept is that a queue deletes only the oldest added element.

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

What are the 5 ways to identify this

A
Global reference ('this' not enclosed in a function refers to the global object)
Free function invocation (functionName() - binds 'this' to the global object)
Using .call() or .apply() (fn.call(target) binds to the first arg passed to either function)
Method invocation (target.methodName() - binds to whatever someObject refers to at call time)
Construction Mode (new functionName() - binds to the new object instantiated)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly