Bonus: 50+
Which complexity is better to optimize, time or space?
Time complexity
Draw a tree data structure
Tree
A computer differentiates between puppies and bagels. What's this an example of?
Machine learning
In javascript/python graphics, where on the canvas are the coords (0, 0)
Top left
Define white, black, and gray hat hackers
Ethical, unethical, mix of both
What makes a computer turing complete?
In principle, it can solve any problem
Model how a stack stores data
Data enters and leaves from the top of the stack
With only 1 hand, lift your fingers to show the number 21
Convert 21 to binary. 1 is finger up, 0 is finger down
Binary: 10101
What's the job of the CPU?
Central processing unit. Takes and executes instructions
Steps to create a Minecraft item: (1) Item object in ModItems class (2) Texture json (3) _____ (4) Translation
Item's texture png
Who made the turing machine?
Alan Turing
Model how binary search works
Continually divides sorted array by comparing to target
What's the basic idea of higher-order functions?
Storing functions in variables
Name 2 game engine softwares
Ex: Unity, Godot, Unreal Engine, Gamemaker
What's Google Dorking?
Hacking through precise google searches
What do P and NP stand for?
Polynomial and nondeterministic polynomial
Describe how a hash table works
Pairs unique keys to values that are dynamically stored
What's the basic idea of dynamic programming?
Solving a problem more efficiently by solving and storing sub-problems
Write the 2 truth tables for AND and NAND
IN1 | IN2 | OUT |
0 | 0 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 1 |
IN1 | IN2 | OUT |
0 | 0 | 1 |
1 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 0 |
Shaders take input and give output for every pixel. What's the input and output in regards for each pixel?
Input: Pixel's coords
Output: Pixel's (r,g,b,a)
Rank the efficiencies (low to high) for O(n), O(n^2), O(2^n), O(logn), O(nlogn), O(n!), O(1)
O(1) < O(logn) < O(n) < O(nlogn) < O(n^2) < O(2^n) < O(n!)
How does bubble sort work?
Sorts by pair of #s through array, repeats for unsorted values
What's the purpose of a parity bit?
An extra bit that tells you if you have an odd or even # of 1s
Write the 2 truth tables for XOR and XNOR
IN1 | IN2 | OUT |
0 | 0 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
1 | 1 | 0 |
IN1 | IN2 | OUT |
0 | 0 | 1 |
1 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 1 |
What's the main difference between hashing and encryption?
Hashing is irreversible, encryption is reversible