Skip to content

Instantly share code, notes, and snippets.

var LimitedArray = function(limit) {
var storage = [];
var limitedArray = {};
limitedArray.get = function(index) {
checkLimit(index);
return storage[index];
};
limitedArray.set = function(index, value) {
checkLimit(index);
@gurlock
gurlock / README.md
Last active January 25, 2021 17:25
Data Structures - Overview

Week 0 D4 - Data Structures

Overview

Data structures

  • A

Types

  • Queues A queue works like a line for an amusement park ride -- people enter at the end of the queue and leave from the front (FIFO: first in, first out).
@gurlock
gurlock / README.md
Created August 17, 2017 16:32
Standard Git Workflow Cheat Sheet
@gurlock
gurlock / README.md
Created August 17, 2017 16:11
Basic JS notes

SSP Day N/A

Javascript Basics

Four Basic Values

  • As the size of the problem gets bigger, the cost might grow quickly/slowly/not at all.
  • Mathematical comparison between different plans, or algorithm.
  • Cheat sheet- bigocheatsheet.com working

Four Basic Values

@gurlock
gurlock / README.md
Last active August 17, 2017 18:54
Benefits of efficiency in code

Week 00 Day 4

Complexity Analysis in the Real World

Def algorithm - The system or plan you use to arrive at a solution

  • As the size of the problem gets bigger, the cost might grow quickly/slowly/not at all.
  • Time complexity - Mathematical comparison between different plans, or algorithm.
  • Cheat sheet- bigocheatsheet.com - An approximation of time complexity, describes worst-case performance for large n.

Approaches to complexity