Skip to content

Instantly share code, notes, and snippets.

View carl-parrish's full-sized avatar

Carl Parrish carl-parrish

View GitHub Profile
@carl-parrish
carl-parrish / sieveOfEratosthenes.md
Created December 22, 2017 14:58
Sieve of Eratosthenes
Array.range = (start, stop, step=1) => {
  let A = [start];
  while(start+step <= stop){
    A = [...A, start+=step];
  }
  return A;
}
@carl-parrish
carl-parrish / maxStockProfit.md
Created December 26, 2017 03:53
Max Stock Profit
function maxStockProfit(pricesArr) {

  const Price = {
    'buy': 0,
    'sell': 0,
    'change': true
  };
  
 

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example