Skip to content

Instantly share code, notes, and snippets.

View MiniAppleTheApple's full-sized avatar

MiniApple MiniAppleTheApple

  • Brasil RJ Rio de Janeiro
View GitHub Profile
@PJUllrich
PJUllrich / big-o.md
Last active March 21, 2026 16:40
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@ambrosiogabe
ambrosiogabe / How "slow" is brute force?.cpp
Last active January 30, 2023 15:28
A bunch of smart YouTube viewers said my algorithm is horribly inefficient since it was O(n) and I could have used a hash reducing it to O(1). Well, it turns out they were right, except somehow they forgot to account for the data set size which is a big impact on how slow the algorithm *actually* is. Whoopsy!
// System Specs
// ============
// These benchmarks were run on an Intel i7-9700k @ 3.6 GHz
//
// How it was run
// ===============
// The correct recipe is at the very end of the list of recipes. Which means this must run
// through the entire list, the worst case scenario. The rest of the recipes are randomized
// to offer some variation, but I don't set the slots where the correct recipe has the correct slots.
// to ensure we don't accidentally exit early.
@lupyuen
lupyuen / zig-targets.log
Created May 24, 2022 07:42
Zig Targets
$ zig targets
{
"arch": [
"arm",
"armeb",
"aarch64",
"aarch64_be",
"aarch64_32",
"arc",

MathJax 2.0 Cheatsheet

Note: Use $...$ for inline math and $$...$$ or \[...\] for display math.


Equations

Simple equation