💻
Programming Hard

Programming Quiz for Genius Level Players

Only true programming geniuses need apply — 20 expert-level programming quiz questions and answers across every topic.

20 Questions
35s Per Question
0+ Plays
← All Programming Quizzes 📚 Study Guide for this category →
💡 Create account to save scores & earn XP
📋 View All 20 Questions & Answers

1. What is the halting problem in computer science?

  • A. The undecidable problem of determining whether a given program will finish running or continue forever ✓
  • B. A type of infinite loop bug
  • C. A hardware failure
  • D. A network timeout error

💡 The halting problem asks whether it's possible to determine, in general, if a program will finish running or run forever; it's proven undecidable.

2. What is the significance of the 'Church-Turing thesis'?

  • A. It proposes that any computation that can be performed can be done by a Turing machine ✓
  • B. It proves P equals NP
  • C. It is a sorting algorithm
  • D. It is a database normalization rule

💡 The Church-Turing thesis proposes that any function computable by an algorithm can be computed by a Turing machine.

3. What does 'Byzantine fault tolerance' refer to in distributed systems?

  • A. A system's ability to continue functioning correctly even if some components fail or act maliciously ✓
  • B. A type of database backup
  • C. A sorting algorithm
  • D. A CSS framework

💡 Byzantine fault tolerance describes a distributed system's ability to function correctly even if some nodes fail or behave maliciously.

4. What is 'tail call optimization'?

  • A. A technique where the compiler optimizes recursive calls in the tail position to avoid growing the call stack ✓
  • B. A way to sort arrays
  • C. A type of encryption
  • D. A database indexing method

💡 Tail call optimization allows certain recursive function calls in the tail position to be optimized, avoiding stack growth.

5. What is 'Big O' notation used to describe in the worst case?

  • A. The upper bound of an algorithm's time or space complexity ✓
  • B. The exact runtime in seconds
  • C. The number of lines of code
  • D. The programming language used

💡 Big O notation describes the upper bound, or worst-case growth rate, of an algorithm's time or space requirements.

6. What is 'lambda calculus'?

  • A. A formal system for expressing computation based on function abstraction and application ✓
  • B. A type of Python function
  • C. A sorting algorithm
  • D. A database query language

💡 Lambda calculus is a formal mathematical system for expressing computation through function abstraction and application.

7. What is a 'Turing machine'?

  • A. An abstract mathematical model of computation that manipulates symbols on a tape according to a set of rules ✓
  • B. A physical computer built by Alan Turing
  • C. A type of modern CPU
  • D. A sorting algorithm

💡 A Turing machine is an abstract mathematical model used to formally define what it means for a function to be computable.

8. What is a 'monad' in functional programming?

  • A. A design pattern used to handle program-wide concerns like state or I/O in a functional way ✓
  • B. A type of loop
  • C. A sorting algorithm
  • D. A data structure only used in Python

💡 A monad is a design pattern in functional programming used to structure computations and handle concerns like state or I/O.

9. What is the 'traveling salesman problem'?

  • A. An NP-hard problem asking for the shortest possible route that visits a set of cities exactly once ✓
  • B. A database query optimization technique
  • C. A type of sorting algorithm
  • D. A network routing protocol

💡 The traveling salesman problem is a classic NP-hard problem seeking the shortest route visiting a set of cities exactly once.

10. What does 'NP-complete' mean for a problem?

  • A. It is among the hardest problems in NP, such that if any NP-complete problem can be solved quickly, all NP problems can ✓
  • B. It can always be solved instantly
  • C. It has no known solution
  • D. It is unrelated to computational complexity

💡 NP-complete problems are among the hardest in NP; solving any one quickly would mean all NP problems can be solved quickly.

11. What is the 'CAP theorem' primarily used to analyze?

  • A. Trade-offs in distributed database and system design ✓
  • B. Sorting algorithm efficiency
  • C. Frontend design patterns
  • D. Programming language syntax

💡 The CAP theorem is used to analyze fundamental trade-offs between consistency, availability, and partition tolerance in distributed systems.

12. What is 'referential transparency' in functional programming?

  • A. An expression can be replaced with its value without changing the program's behavior ✓
  • B. A type of database view
  • C. A network security concept
  • D. A sorting technique

💡 Referential transparency means an expression can always be replaced with its computed value without altering program behavior.

13. What is 'homomorphic encryption'?

  • A. A form of encryption that allows computations to be performed on encrypted data without decrypting it first ✓
  • B. A type of hash function
  • C. A sorting algorithm
  • D. A database index

💡 Homomorphic encryption allows computations to be performed directly on encrypted data, without first decrypting it.

14. What is a 'quine' in computer science?

  • A. A program that produces a copy of its own source code as its output ✓
  • B. A type of database
  • C. A sorting algorithm
  • D. A network protocol

💡 A quine is a self-replicating program that outputs its own source code exactly.

15. What is 'Kolmogorov complexity'?

  • A. A measure of the computational resources needed to specify an object, such as the length of the shortest program that produces it ✓
  • B. A sorting algorithm
  • C. A type of database normalization
  • D. A network protocol

💡 Kolmogorov complexity measures the shortest possible description, such as the shortest program, needed to produce a given object.

16. What is a 'race condition'?

  • A. A situation where the behavior of software depends on the relative timing of uncontrollable events like thread execution order ✓
  • B. A type of sorting algorithm
  • C. A database design flaw
  • D. A network latency issue

💡 A race condition occurs when software behavior depends unpredictably on the timing of concurrent operations.

17. What is the significance of the 'P = NP?' question if proven true?

  • A. It would mean many currently intractable problems could be solved efficiently, reshaping computer science and cryptography ✓
  • B. It would have no practical impact
  • C. It would prove all algorithms run in constant time
  • D. It would eliminate the need for programming languages

💡 If P were proven to equal NP, many currently intractable problems could suddenly be solved efficiently, with huge implications for cryptography and computing.

18. What is the 'P vs NP' problem concerned with?

  • A. Whether every problem whose solution can be quickly verified can also be quickly solved ✓
  • B. A type of sorting algorithm
  • C. A database design principle
  • D. A network protocol

💡 The P vs NP problem asks whether every problem with a quickly verifiable solution can also be quickly solved.

19. What is 'garbage collection' in programming languages?

  • A. An automatic memory management process that reclaims memory occupied by objects no longer in use ✓
  • B. A manual process for deleting files
  • C. A type of sorting algorithm
  • D. A network security protocol

💡 Garbage collection automatically reclaims memory occupied by objects that are no longer reachable or in use.

20. What is 'deadlock' in concurrent programming?

  • A. A situation where two or more processes are unable to proceed because each is waiting for the other to release a resource ✓
  • B. A type of infinite loop
  • C. A memory leak
  • D. A syntax error

💡 Deadlock occurs when two or more processes are each waiting for the other to release a resource, causing them to be permanently stuck.

More Programming Quizzes

View all Programming quizzes →