zpooky / sputil

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#ref https://www.nayuki.io/page/ https://github.com/NikitaSkripchenko/Algorithms-and-DS-in-C http://btechsmartclass.com/DS/U1_T1.html "data structures" https://github.com/trekhleb/javascript-algorithms

#demo https://people.ok.ubc.ca/ylucet/DS/Algorithms.html

sputil

TODO

concurrent

  • Dekker
  • trieber stack

type safe uint8_t uint16_t ...

u8 u16 ...

#string utf8 suffix tree https://stackoverflow.com/questions/9452701/ukkonens-suffix-tree-algorithm-in-plain-english/9513423#9513423

#file path Path p; p.pop(); = cd .. = path.drop_from_right_until("/") p.push(s.split(/).foreach); = cd s = . = nop .. = p.pop() s = path.push(s)

Distinct numeric

DISTINCT_NUMERIC(name,underlying_type)

src/util/Either.h

template<typename L, typename R>
struct Either;

Left l(failure);
Right r(value);

sort

Diffie Hellman

RSA

...

Blowfish

bcrypt

cbc,ecb ...

timeout

60seconds 1hour

  • array is a calender day
  • tuple consist of start and end time = Can attend all meetings?

Graph-coloring

  • Markov chains

compress

Consensus

  • paxos
  • raft

Heap

  • Fibonacci
  • Binomial heap

tree

https://www.nayuki.io/page/aa-tree-set Splay Trees - http://btechsmartclass.com/DS/U5_T5.html

shuffle

https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

filter

  • Cuckoofilter

xor-swap

regex

calculator

Cellular Automaton

http://mathworld.wolfram.com/CellularAutomaton.html

hashmap

https://rocksdb.org/blog/2018/08/23/data-block-hash-index.html https://github.com/stanford-futuredata/index-baselines/blob/master/hashing.cpp

https://reddit.com/comments/9lw5pu "Advanced techniques to implement fast hash tables" https://attractivechaos.wordpress.com/2018/10/01/advanced-techniques-to-implement-fast-hash-tables/

TODO

Graph

Mark-and-Sweep

Bellman–Ford algorithm

"https://en.wikipedia.org/wiki/Bellman–Ford_algorithm" Computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph

prim Minimum spanning tree

"https://en.wikipedia.org/wiki/Prim%27s_algorithm" greedy algorithm that finds a minimum spanning tree for a weighted undirected graph

About

License:Apache License 2.0


Languages

Language:C++ 98.6%Language:Makefile 0.7%Language:Meson 0.5%Language:Python 0.2%Language:C 0.0%