History
Syntax
Logic
Data Structures/Sorts
100

Considered the father of theoretical computer science and artificial intelligence

Alan Turing

100

JAVA

public static void main(String args) {
        //I have a comment here*/
}

String[] args

100

if(!!!!!true)
            Output("False");
        else
            Output("True");

{Output = cout or System.out.println()}

True

100

What is my favorite data structure?

Best answer wins, be it efficient, funny, or my actual preference :)

Probably a HashMap or Set, it's quick but not space efficient.

200

Who created C?

Dennis Ritchie

200

Who created C?

Dennis Ritchie

200

Java

String s = "hello";
Stack<Character> chars = new Stack<Character>();
        for (int i = 0; i < s.length(); i++) {
            chars.push(s.charAt(i));
            System.out.println(chars.pop());
        }

C++
string s = "hello";
    stack<char> chars;
    for (int i = 0; i < s.size(); i++)
    {
        chars.push(s.at(i));
        cout << chars.top() << endl;
        chars.pop();
    }

h
e
l
l
o

You pop it right off

200

What is the O(n) of searching in an AVL Tree?

log(n)
300

When was TCP (Transmission Control Protocol) invented? By who?

In May 1974, Vint Cerf and Bob Kahn.

300

C++
vector<int> path = graph.bfsPath();
    for (int i :: path)
    {
        cout << i << endl;
    }

Java
ArrayList<Integer> list = new ArrayList<>();
        for (Integer integer :: list) {
            System.out.println(integer);
        }

The :: must be :

:)

300

int test = 31;

System.out.println(test >> 2);

or

cout << (test >> 2) << endl;

7

:)

0001 1111
becomes
00000111

300

What is the right child of the 3rd element if this array resembles a heap?

9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1

1


:)

400

Name of the AI Bot which beat world's best Go player.

AlphaGo

400

Java: What does the body of an abstract method contain?

C++: What does a pure virtual function contain?

Nothing, it has no body.

;)

400

Java-specific:

String string = "hiii";
String test = "hiii";
if(string == test)
     System.out.println("Same");
else
     System.out.println("Different");

Same

The JVM checks if there is already a string literal in the "String Literal Pool" to increase efficiency.

400

Which data structure would you use to store students if a student object contains a [name, id, email address, and gender] and you don't need to worry about memory?

Set

As opposed to map, the Set structure does not need a key-value pair, it just needs a key which can be the student ID

500

How were programs written in the mid-1970s as the programming languages were invented?

Punch card programming
500

Find the syntax error:

Java: System.out.println("Hello World!'');

C++: cout << "Hello World'' << endl;

" vs ''

;)

500

Run the code, what will be counter?
int counter = 7;
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; i++) {
                counter++;
                j++;
            }
        }

//What is counter here?

17

;)

500

What sorting algorithm is out-of-place, time complexity is O(nlogn) and space complexity is O(n)?

Merge-sort

M
e
n
u