Skip to content

Instantly share code, notes, and snippets.

View guligon90's full-sized avatar

Guilherme Gonçalves guligon90

View GitHub Profile
const problemSize = 10000;
const g = n => n ** 2; // theoretical guess function
const timeRatios = [];
const m = 5; // from the O(g(n)) definition
const alpha = 1/127.372 // some suitable conversion constant
// depending on the CPUs number of
// instructions per second
let start = 0;
for (const n = m; i <= problemSize; n++) {
@guligon90
guligon90 / max_sum_path.py
Last active October 10, 2021 18:09
max_sum_path.py: Script that calculates the maximum sum path between two lists of integers.
from typing import (
Callable,
Iterator,
Generator,
Protocol,
Tuple,
TypeVar,
)