Skip to content

Instantly share code, notes, and snippets.

View BrooklinJazz's full-sized avatar

Brooklin Myers BrooklinJazz

View GitHub Profile
@BrooklinJazz
BrooklinJazz / big-o.md
Last active May 17, 2022 01:42 — forked from PJUllrich/big-o.md
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
@BrooklinJazz
BrooklinJazz / function_order.ex
Last active September 12, 2021 07:09 — forked from rodrigues/function_order.ex
Sort module functions alphabetically
defmodule Aplicar.Checks.SortModuleFunctions do
use Credo.Check,
base_priority: :low,
explanations: [
check: """
Alphabetically ordered lists are more easily scannable by the read.
# preferred
def a ...
def b ...
def c ...