6 % 2
0
What data structure does an initialization like:
int my_arr[][] = ...
represent?
A 2D array (array of arrays)
Rename a file
mv
What's the big-o notation for an algorithm with quadratic complexity?
O(n2)
What format specifier (%s, %d, %i, %p, etc) tells printf to expect an integer?
%d
12 % 100
12
Name a limitation of standard arrays (what's one thing they can't do?)
can't be resized, can't store diverse data types, no built-in size function
Move directories
cd
About how many computations will a O(n) algorithm perform on a 5,000-element list?
5,000
What's a quick way to remember the scope of a variable in C++?
Generally, they only exist within the curly braces they were created in
0 % 16
What do FIFO and LIFO stand for, as they related to stacks and queues?
First in first out, last in last out
Move "back" or "up" a directory
cd ..
When dealing with logarithmic runtimes, it's not log base 10, but log base _____?
2
What's the bug?
printf("Your score on the %f test was %s\n", "math", 85.3);
The %s and %f are swapped
84 % 5
What data structure follows a "last in, first out" paradigm?
Stack
Delete a directory
rmdir or rm -r
Algorithms with nested for loops usually result in which type of big-o complexity?
O(n2)
What is one thing a struct cannot hold?
A function definition!
99 % 0
error!
What's a vector?
A re-sizeable array!
Print the contents of a file to the terminal
cat
What does O(logn) tell us about the algorithm it's evaluating?
It splits the problem in 2 over and over again
Evaluate:
!(true || !(!(false || !false))) || true
true