Business Problem -> Facts ~~ -> Gaps ~~ -> Solution
(Hypthesis)
Process: To work solution-oriented from an early stage, hypothesis are needed to "fill the gaps"
mkdir -p "$PWD/opt/node" && curl -sL https://nodejs.org/dist/v22.13.0/node-v22.13.0-linux-x64.tar.gz | tar -xz -C "$PWD/opt/node" --strip-components=1 -f - |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE OverloadedStrings #-} |
{ | |
"name": "IUXTA Pool", | |
"description": "iuxta-casus pool", | |
"ticker": "IUXTA", | |
"homepage": "https://iuxta-casus.com" | |
} |
const _ = require('lodash'); | |
mapToObject = m => _.isMap(m) ? [...m].reduce((o, entry) => ({...o, ...{ [_.head(entry)]: mapToObject(_.head(_.tail(entry))) }}), {}) : m; |
const I = x => x; | |
const K = x => y => x; | |
const A = f => x => f(x); | |
const T = x => f => f(x); | |
const W = f => x => f(x)(x); | |
const C = f => y => x => f(x)(y); | |
const B = f => g => x => f(g(x)); | |
const S = f => g => x => f(x)(g(x)); | |
const P = f => g => x => y => f(g(x))(g(y)); | |
const Y = f => (g => g(g))(g => f(x => g(g)(x))); |
Already going to assume that you know about prefix sums before you read this.
We can all agree that for an array A = []
, where N = A.length
, that there are N
prefix sums.
prefix[0] = A[0], prefix[1] = A[0] + A[1], ... prefix[i] = prefix[0] + ... + prefix[i].
Then to calculate how many subarrays are divisible by K is logically equivalent to saying, how many ways can we pair up all prefix sum pairs (i,j)
where i < j
such that (prefix[j] - prefix[i]) % K == 0
{ | |
permaBan: [/He/], | |
mt: false, | |
jp: false, | |
} | |
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"window.zoomLevel": 0, | |
"terminal.integrated.fontFamily": "'Dank Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'", | |
"gitlens.advanced.messages": { | |
"suppressCommitHasNoPreviousCommitWarning": false, | |
"suppressCommitNotFoundWarning": false, | |
"suppressFileNotUnderSourceControlWarning": false, | |
"suppressGitVersionWarning": false, | |
"suppressLineUncommittedWarning": false, |
Mostly paid list of resources to learn JavaScript and React. This list is sorted in descending recommended order and is grouped by paid and free. My experience is that paid resources are easier to find at the moment but there are lots of great free resources out there. My favorite paid instructors are Stephen Grider and Kent C. Dodds.