I know how to handle collisions in a hash table
Use a linked list to store multiple values using the same key
I know the difference between an array and linked list
An array is one object that contains elements
A linked list is a data structure consisting of objects often referred to as nodes that typically contain 2 properties, the value of the node and a next property that points to the next node in the linked list.
I know how to implement fibonacci with dynamic programming
Use memoization with the recursive solution to fibonacci
var fibonacci = (function () {
var memo = [0, 1];
var fib = function (n) {
var result = memo[n];
if (typeof result !== 'number') {
result = fib(n - 1) + fib(n - 2);
memo[n] = result;
}
return result;
};
return fib;
}());I can reverse an array in place
function reverse (array) {
var i = 0,
n = array.length,
middle = Math.floor(n / 2),
temp = null;
for (; i < middle; i += 1) {
temp = array[i];
array[i] = array[n - 1 - i];
array[n - 1 - i] = temp;
}
return array
}I know what a Set is used for
Set objects are collections of values. You can iterate through the elements of a set in insertion order. A value in the Set may only occur once; it is unique in the Set’s collection.
I know constant, linear, logarithmic, quadratic, exponential time complexity