This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"index":{"_id":1}} | |
{"title":"The Millstone","author":"Herta Mann","publisher":"Bloomsbury Publishing Plc","genre":"Suspense/Thriller","rating":5,"release_date":"2016-11-16"} | |
{"index":{"_id":2}} | |
{"title":"The Line of Beauty","author":"Leopold Johnston","publisher":"Bloodaxe Books","genre":"Fairy tale","rating":2,"release_date":"2016-11-30"} | |
{"index":{"_id":3}} | |
{"title":"The Wings of the Dove","author":"River Denesik","publisher":"Medknow Publications","genre":"Speech","rating":2,"release_date":"2016-12-10"} | |
{"index":{"_id":4}} | |
{"title":"A Monstrous Regiment of Women","author":"Simone Gleichner","publisher":"Applewood Books","genre":"Narrative nonfiction","rating":5,"release_date":"2016-10-22"} | |
{"index":{"_id":5}} | |
{"title":"If Not Now, When?","author":"Corrine Gulgowski DVM","publisher":"Manchester University Press","genre":"Textbook","rating":3,"release_date":"2016-11-20"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Array | |
knapsack :: [Int] -> Int -> Bool | |
knapsack xs cap = table!(cap, n) | |
where | |
n = length xs | |
ks = listArray (1, n) xs | |
table = array ((0,0), (cap, n)) $ | |
[((k, 0), k == 0) | k <- [0..cap]] ++ | |
[((k, i), ans k i) | k <- [0..cap], i <- [1..n]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Building struct { | |
left int | |
height int | |
right int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"flag" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |