POS Tag | Description | Example |
---|---|---|
CC | coordinating conjunction | and |
CD | cardinal number | 1, third |
DT | determiner | the |
EX | existential there | there is |
FW | foreign word | les |
IN | preposition, subordinating conjunction | in, of, like |
IN/that | that as subordinator | that |
JJ | adjective | green |
/** | |
* Shuffles array in place. Fisher-Yates algo. | |
* @param {Array} a items An array containing the items. | |
*/ | |
const shuffle = function(arr) { | |
// Start i from the last element and move left. Swap with a random element to the left of i | |
for (let i = arr.length - 1; i > 0; i--) { | |
// j is a random element to the left of i | |
const j = Math.floor(Math.random() * (i + 1)); | |
// Swap elements at i and j |
/* | |
Node Notes | |
*/ | |
/* | |
========== Synchronous command line input w/o using external library ========== | |
*/ | |
process.stdin.setEncoding('utf8'); | |
function readlineSync() { |
class: center middle
Currying is the process by which a function of N arguments is implemented as N single-argument functions such that first of them takes in the first argument and returns a function which takes in the 2nd argument and so on, until the Nth single-argument function finally returns the value of the multi-argument function being implemented.
class: center middle
Write a function that determines if a path exists between two vertices of a directed graph.
The graph will be represented as an object, each of whose keys represents a vertex of the graph and whose value represents all vertices that can be reached from the aforementioned key.
Given an an array of numbers, find the length of the longest possible subsequence that is increasing. This subsequence can "jump" over numbers in the array. For example in [3, 10, 4, 5]
the longest increasing subsequence (LIS) is [3, 4, 5]
.
longestIncreasingSubsequence([3, 4, 2, 1, 10, 6]);
// should return 3, the length of the longest increasing subsequence:
// 3, 4, 6 (or 3, 4, 10)
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
trim_trailing_whitespace = true | |
insert_final_newline = true |