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
/** | |
* Binary Heap exercise implementation in go using a slice to store the tree. | |
* | |
* A heap is a balanced binary tree, with the invariant that each node is | |
* smaller then all of its children, thus making the root node the minimal | |
* value in the tree (MinHeap; in MaxHeap, it's exact reversed). Heaps are | |
* useful for sorting and priority queues. | |
* See: https://en.wikipedia.org/wiki/Binary_heap | |
* | |
* In order to remove overhead, the heap is represented as an array with the |
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
/** | |
* Radix LSD sort implementation excercise written in Go. | |
* | |
* A Radix sort is a non-comparative integer sorting algorithm that sorts data | |
* with integer keys by grouping keys by the individual digits which share the | |
* same significant position and value. Instead of using complex logical | |
* comparison operations, which are relatively costly, the Radix sort uses | |
* binary operations to compare single keys in binary order. In this | |
* implementation, the keys are generated arbitrarly by the caller, and since | |
* they represent order-preserving binary characters, they can be converted to |
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
/** | |
* External Map is a wrapper around Go's built-in map types to support growing | |
* the number of keys beyond the available memory by dumping parts of it to | |
* disk. | |
* | |
* It starts out as normal in-memory map, and a predefined threshold for | |
* its maximum capacity (Max), which is the maximum number of items the map will | |
* contain. When Max is reached, a Split operation takes place that cuts | |
* the map in half - keeping ~Max/2 items in-memory and saving the rest | |
* to disk. As a side-effect, the Split also maintains a small in-memory |
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
const AWS_KEY = ''; | |
const AWS_SECRET = ''; | |
const S3_BUCKET = ''; | |
const DATA_JSON_URL = 'https://data.cityofnewyork.us/api/views/jb7j-dtam/rows.json?accessType=DOWNLOAD'; | |
const REDSHIFT_CLUSTERS = { | |
'2x.dc1.large': {} // host, user, password, database, port | |
'2x.dc1.8xlarge': {}, | |
'2x.ds2.xlarge': {}, | |
'2x.ds2.8xlarge': {}, | |
} |