Jack Watts
’s
Fantastic
Guide for Fake CompSci Knowledge
Data Structures:
Tree
:
-
Varieties:
Red
-
black
, B version, AVL, self
-
balancing, Minimum Spanning
-
zig, zig
-
zig, and zig
-
zag steps
-
Prim +Kruskal algorithm
-
used in the
minimum spanning
kind
-
traversing them
-
can be done in
Preorder, Inorder, Post
-
Order
-
Heaps
-
when the child values are always LESS than the parent values
-
Suffix
and
prefix
-
acyclic connected graphs
-
root and leaf nodes
Stack
:
-
Reverse Polish Notation
-
push and pop
= in and
out operations
-
last in, first out
-
commonly use divide and conquer algorithms
-
In C++, “this” is a pointer in a stack (not a common clue but may be worth knowing)
Arrays
:
-
Constant lookup time, unlike linked lists
-
denoted by
square brackets
-
multi
-
dimensional types
-
useful for storing matrices
Linked Lists
:
-
CAR and CDR
coding
-
sentinel nodes
-
basic data structure in
LISP
-
types: single, double, linear, circular
-
Each node has 2 fields
-
its value and location of the next value
Algorithms (note
: specific versions of algorithms are tossed up sometimes, be careful):
Search
:
-
Grover’s algorithm
-
can accomplish it in √n time and log
2
n space in quantum computing
-
on graphs
-
can be
best
-
first, breadth
-
first, depth
-
first
-
Binary
form
-
assumes list is sorted and eliminates ½ on each pass by picking the middle
element
-
improvement of NAÏVE methods
-
can be done in constant time in a well
-
built hash table
-
genetic algorithms optimize it
-
reads elements and compares to target (key
word)
Sort
:
-
types:
merge
, binary tree,
bubble
,
Bozo
(like the clown),
quick
, heap
-
bubble sort
-
I have no idea what the technical process is, but it essentially moves s
tuff
around
until it’s good
-
listen for the description
, it’s named because the result
s “float” to the top
-
quicksort
-
invented by
C.A.R Hoare
-
uses pivot values
Misc
:
Pointers
:
-
during
(de)serialization
they can undergo
(un)swizzling
-
Wild and dangling
ones
-
can lead to segmentation faults
-
In C and C++ they are denoted by an asterisk
-
Each node in a linked list has 2 of them
-
smart type=automatic garbage collection
-
iterators
-
a type subject to postfix operators
-
what they are: references that hold memory addresses of things, not the actual data of the
things
Compilers:
-
Dragon Boo
k=a tome describing their designs (I’ve only heard this clue once, but it sounds cool
so I’m including it)
-
Yacc
-
pronounced like yak, stands for Yet Not Another Compiler Compiler
-
Javac
(Java
-
see)
-
Java compiler
-
tokenization
and syntax
,type
-
checking
-
constant folding and loop unrolling
-
source
-
to
-
source
-
bootstrapping
-
writing one in its own source language
-
What it is
-
essentially a translator from one language to another
Enter the password to open this PDF file:
File name:
-
File size:
-
Title:
-
Author:
-
Subject:
-
Keywords:
-
Creation Date:
-
Modification Date:
-
Creator:
-
PDF Producer:
-
PDF Version:
-
Page Count:
-
Preparing document for printing…
0%
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο