Skip to content

Instantly share code, notes, and snippets.

@amysimmons
Last active December 26, 2017 06:48
Show Gist options
  • Select an option

  • Save amysimmons/6cb9f48af62f41ab962e to your computer and use it in GitHub Desktop.

Select an option

Save amysimmons/6cb9f48af62f41ab962e to your computer and use it in GitHub Desktop.
WDI Week 11 Notes

#WDI Week 11 Notes

##Monday

##Warmup

https://github.com/wofockham/wdi-8/commit/ea0dc92974fe41b5d4cf2dc473b5ee483849b2f6

##DEMOS

##Four Brothers problem

##Who's Who

https://gist.github.com/wofockham/68c9080670934e5d5009

##Algorithms

Bubble sort:

http://www.teaching-materials.org/algorithms/#/17

https://github.com/wofockham/wdi-8/tree/master/11-compsci/algorithms

Binary search:

https://github.com/wofockham/wdi-8/tree/master/11-compsci/algorithms

The travelling salesman problem:

Considered an NP-hard problem...

Can't be solved in a quick, easy way

Can only be done by summing all possible routes and finding the shortest one

##You Teach

https://play.golang.org/

##Number crunching

###Homework

Roman Numerals homework

(also from roman to numeral)

Finish bubblesort

Finish binary search

Number crunching tests

Who's who:

https://gist.github.com/wofockham/68c9080670934e5d5009

In addition to his writings on computer science, Knuth, a Lutheran,[17] is also the author of 3:16 Bible Texts Illuminated,[18] in which he examines the Bible by a process of systematic sampling, namely an analysis of chapter 3, verse 16 of each book. Each verse is accompanied by a rendering in calligraphic art, contributed by a group of calligraphers under the leadership of Hermann Zapf.

Subsequently he was invited to give a set of lectures on his 3:16 project, resulting in another book, Things a Computer Scientist Rarely Talks About, where he published the lectures "God and Computer Science".

Knuth used to pay a finder's fee of $2.56 for any typographical errors or mistakes discovered in his books, because "256 pennies is one hexadecimal dollar", and $0.32 for "valuable suggestions". According to an article in the Massachusetts Institute of Technology's Technology Review, these Knuth reward checks are "among computerdom's most prized trophies". Knuth had to stop sending real checks in 2008 due to bank fraud, and instead now gives each error finder a "certificate of deposit" from a publicly listed balance in his fictitious "Bank of San Serriffe".[21]

##Tuesday

###Warmup

###Number demos

###Machine learning

http://www.cs.cmu.edu/~tom7/mario/

###Recursion

Recursion is really old. It's older than loops.

It is used when you want something to happen over and over again.

def infinity_and_beyond
  infinity_and_beyond
end

The above method keeps calling the function infinity_and_beyond over and over again.

Ruby countdown:

def countdown_iterative(num)
  while num > 0
    puts num
    num -= 1
    sleep 1
  end
  puts "Blastoff!"
end

countdown_iterative(5)

Recursive countdown:

def countdown_recursive(num)
  if num <= 0
    puts 'Blastoff!' #base case
  else 
    puts num
    countdown_recursive(num - 1) #a step closer to the base case
  end
end

countdown_recursive(5)

With a recursive loop, the things you need to identify are what is my base case, and what do I need to do to get there?

Resources:

http://en.wikipedia.org/wiki/Tower_of_Hanoi

http://www.amazon.com/gp/product/0262510871/ref=pd_lpo_sbs_dp_ss_1?pf_rd_p=1944687682&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0262560992&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=19EXG8VHNMTC674XQVNH

http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262560992

###Data structures

stack overflow

unwinding the stack

####Singly linked list

###You teach

##Wednesday

###Warmup

###Build a internet

###Taoup

###SLL DEmos

###Interview Qs

###Origin Story

###Dark Web

###5pm Thoughtworks

##Thursday

##Friday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment