Javascript
Sorting
Binary, Logic
Data Structures
Misc
100
What is the output of the following code? for (let i in ['a','b','c']) { console.log(i); }
0, 1, 2
100
A divide and conquer algorithm that has a worst case time complexity of O(n log n).
merge sort
100
Calculate the following binary logic: 101 & 1111 (bitwise AND)
101
100
A collection base on the first-in first-out policy.
queue
100
Which Javascript String prototype method accepts a regular expression, and returns the index of the first match.
.search()
200
Array method that fills all the elements of an array from a start index to an end index with a static value.
.fill()
200
Sorting Algorithm characteristic in which items that rank the same are not guaranteed to stay the same with successive sorts of that collection.
unstable sort
200
What is 12 | 1? (Decimal 12 bitwise OR decimal 1)
13
200
A collection based on the last-in first-out principle.
stack
200
A type of algorithm that puts elements of a list in a certain order.
a sorting algorithm
300
What will the following code output in the console? console.log("A" - "B" + "2")
"NaN2"
300
A sorting algorithm that repeatedly swaps the adjacent elements if they are in the wrong order.
bubble sort
300
Given the decimal number 414, apply a bitwise left-shift. What is the resulting decimal number?
828
300
Describes a data structure that cannot be changed once it has been created.
immutable
300
In a linked list, the last node points to what?
null
400
What is the output of the following code? (Note the two console.logs) var salary = "1000$"; (function () { console.log("Original salary was " + salary); var salary = "5000$"; console.log("My New Salary " + salary); })();
undefined, "5000$"
400
A sorting algorithm that builds the final sorted array one item at a time, by repeatedly finding the smallest item.
selection sort
400
Convert the binary value 10101010 into hexadecimal.
AA
400
A list where nodes do not have references to previous nodes.
singly linked list