Logic and Algorithms Flashcards

1
Q

IFO with LIFO:

Make a FIFO queue using only LIFO stacks. Then build a LIFO stack using only FIFO queues.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Stack Overflow:

Write a snippet of code affected by a stack overflow.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Tail Recursive n!:

Write a tail-recursive version of the factorial function.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

REPL:

Using your preferred language, write a REPL that echoes your inputs. Evolve it to make it an RPN calculator.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Defragger:

How would you design a “defragger” utility?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Mazes:

Write a program that builds random mazes.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Memory Leaks:

Write a sample program that produces a memory leak.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

PRNG:

Generate a sequence of unique random numbers.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Garbage Collecting:

Write a simple garbage collection system.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Queues:

Write a basic message broker, using whatever language you like.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Simple Web Server:

Write a very basic web server. Draw a road map for features to be implemented in the future.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Sorting Huge Files:

How would you sort a 10GB file? How would your approach change with a 10TB one?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Duplicates:

How would you programmatically detect file duplicates?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly