Skip to content

Instantly share code, notes, and snippets.

View nhannb's full-sized avatar
👨‍💻
Brewing software!

Nhan Nguyen nhannb

👨‍💻
Brewing software!
View GitHub Profile
You are given several lists of integers. The integers in each list are
non-increasing from the list head to the list tail (so the largest value in a
list will always be at the head, and the smallest at the tail). You may assume
every list contains at least one integer. A list may contain duplicate entries.
You are asked to build a sum by picking one integer from each list. Find the n
largest sums amongst all the combinations of picking an integer from each list,
where n is some positive value. For example if n is 1, then you are simply
expected to find the sum that can be created by adding together the highest
integers in all the lists. If there are not n largest sums available (i.e. n is
@nhannb
nhannb / FuncProg-1.scala
Created October 8, 2016 10:38
Functional Programming for Scala Assignment Solution
package recfun
object Week1 {
def main(args: Array[String]) {
println("Pascal's Triangle")
for (row <- 0 to 10) {
for (col <- 0 to row)
print(pascal(col, row) + " ")
println()
}
@nhannb
nhannb / 0_reuse_code.js
Created April 30, 2016 09:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-bigpicture - Start in Steam Big Picture mode
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
-complete_install_via_http - Run installation completion over HTTP by default
-console -
-cybercafe - Forces cyber cafe mode for debugging
-debug_steamapi - enables logging of Steam API functions