Cheat sheet for statistics homeworks
let array = ['cat', 'dog', 'fish'];let array2 = new Array(3);array[3] = 'dog';array[1] = 'cat';delete array[3];array.forEach(function(item) { console.log(item);}array.include('cat');let dict = new Dictionary();dict.add('cat', 10);dict.set('percentage', 5.10);dict.remove('percentage');dict.hasKey('frequency');dict.hasValue(10);let hashset = new HashSet();hashset.add(1);hashset.delete(1);hashset.has(3);let keys = hashset.values();for(let i = 0; i < keys.length; i++){ console.log(keys[i]);}const list = new List();list.add(1);list.addAtHead(0);list.remove(2);list.set(0, 251);list.contains(1);for(let i = 0; i < list.size(); i++){ console.log(list.get(i));}let stack = new Stack();stack.push(1);stack.peek();stack.pop();let sortedSet = new SortedSet();sortedSet.add(3);sortedSet.delete(3);sortedSet.has(1);for(element in sortedSet.toArray) { console.log(element);}let queue = new Queue();queue.enqueue(1);queue.front();queue.dequeue();queue.contains(7);let linkedList = new LinkedList();linkedList.append(1);linkedList.prepend(1);linkedList.addAt(1, 1);linkedList.fetchHead();linkedList.getAt(1);linkedList.removeAt(1);linkedList.delete(1);linkedList.contains(1);for (const e of linkedList) { console.log(e);}No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.