Logic and Algorithms Flashcards
IFO with LIFO:
Make a FIFO queue using only LIFO stacks. Then build a LIFO stack using only FIFO queues.
Stack Overflow:
Write a snippet of code affected by a stack overflow.
Tail Recursive n!:
Write a tail-recursive version of the factorial function.
REPL:
Using your preferred language, write a REPL that echoes your inputs. Evolve it to make it an RPN calculator.
Defragger:
How would you design a “defragger” utility?
Mazes:
Write a program that builds random mazes.
Memory Leaks:
Write a sample program that produces a memory leak.
PRNG:
Generate a sequence of unique random numbers.
Garbage Collecting:
Write a simple garbage collection system.
Queues:
Write a basic message broker, using whatever language you like.
Simple Web Server:
Write a very basic web server. Draw a road map for features to be implemented in the future.
Sorting Huge Files:
How would you sort a 10GB file? How would your approach change with a 10TB one?
Duplicates:
How would you programmatically detect file duplicates?