Notion Cheat Sheet

Posted : admin On 1/29/2022

Probability Cheat Sheet Distributions Unifrom Distribution notation Ua;b cdf x a b a for x2a;b pdf 1 b a for x2a;b expectation 1 2 (a+ b) variance 1 12 (b a)2 mgf etb eta t(b a) story: all intervals of the same length on the distribution’s support are equally probable. Gamma Distribution notation Gamma(k; ) pdf kx 1e x ( k) I x0 ( k. Cheat Sheet of Mathemtical Notation and Terminology Logic and Sets Notation Terminology Explanation and Examples a:=b defined by The objectaon the side of the colon is defined byb. Examples:x:= 5means thatxis defined to be5, orf.x/:=x2.1means that the functionf is defined to bex2. 1, orA:= ^1;5;7‘means that the setAis defined to be^1;5:7‘.

Common Data Structure Operations

Data StructureTime ComplexitySpace Complexity
Singly-Linked ListΘ(n)Θ(n)Θ(1)Θ(1)O(n)O(n)O(1)O(1)O(n)
Doubly-Linked ListΘ(n)Θ(n)Θ(1)Θ(1)O(n)O(n)O(1)O(1)O(n)
Skip ListΘ(log(n))Θ(log(n))Θ(log(n))Θ(log(n))O(n)O(n)O(n)O(n)O(n log(n))
Hash TableN/AΘ(1)Θ(1)Θ(1)N/AO(n)O(n)O(n)O(n)
Binary Search TreeΘ(log(n))Θ(log(n))Θ(log(n))Θ(log(n))O(n)O(n)O(n)O(n)O(n)
Cartesian TreeN/AΘ(log(n))Θ(log(n))Θ(log(n))N/AO(n)O(n)O(n)O(n)
Red-Black TreeΘ(log(n))Θ(log(n))Θ(log(n))Θ(log(n))O(log(n))O(log(n))O(log(n))O(log(n))O(n)
Splay TreeN/AΘ(log(n))Θ(log(n))Θ(log(n))N/AO(log(n))O(log(n))O(log(n))O(n)
AVL TreeΘ(log(n))Θ(log(n))Θ(log(n))Θ(log(n))O(log(n))O(log(n))O(log(n))O(log(n))O(n)
KD TreeΘ(log(n))Θ(log(n))Θ(log(n))Θ(log(n))O(n)O(n)O(n)O(n)O(n)

Array Sorting Algorithms

Notion cheat sheet template
AlgorithmTime ComplexitySpace Complexity
QuicksortΩ(n log(n))Θ(n log(n))O(n^2)O(log(n))
MergesortΩ(n log(n))Θ(n log(n))O(n log(n))O(n)
TimsortΩ(n)Θ(n log(n))O(n log(n))O(n)
HeapsortΩ(n log(n))Θ(n log(n))O(n log(n))O(1)
Bubble SortΩ(n)Θ(n^2)O(n^2)O(1)
Insertion SortΩ(n)Θ(n^2)O(n^2)O(1)
Selection SortΩ(n^2)Θ(n^2)O(n^2)O(1)
Tree SortΩ(n log(n))Θ(n log(n))O(n^2)O(n)
Shell SortΩ(n log(n))Θ(n(log(n))^2)O(n(log(n))^2)O(1)
Bucket SortΩ(n+k)Θ(n+k)O(n^2)O(n)
Radix SortΩ(nk)Θ(nk)O(nk)O(n+k)
Counting SortΩ(n+k)Θ(n+k)O(n+k)O(k)
CubesortΩ(n)Θ(n log(n))O(n log(n))O(n)

How To Setup The Database

Notion Format Date

  • Create one Child relation property connected both ways. Search for the database you are currently in. The second relation property that appears will be the Parent. Rename both properties accordingly.

  • Create one rollup property called Grandparents. Configure it to grab the parent and show that parent’s parent. A.k.a the grandparent of the current entry.

Notion Cheat Sheet

How To Create A Template To Navigate To Grandparents And Grandchildren

  • If you want the ability to navigate to the grandparent and grandchildren relations, something the above technique alone will not allow (rollups are only windows, not links), follow these instructions.

  • First, create another rollup property called Grandchildren and configure it to grab the current entry’s child’s child.

  • Next, create a template and insert TWO linked databases (trigger: /linked database) into the body of the page and search for the current database.

  • Create two columns labeled Grandparents and Grandchildren inside the template page and drag the two linked databases underneath. I switched the default table to list view.

  • Configure the filter of the Grandparents like this:

    • Grandchildren Rollup contains Name of Template

  • Configure the filter of the Grandchildren like this:

    • Grandparents Rollup contains Name of Template

Formulas In Notion

This is a small segment of my work-in-progress family tree. Finding automatic connections between grandparents/children is essential for my setup.