CS Cheat Sheet 2026

The 30 highest-yield CS facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

100 questions
180 min time limit
70.00% to pass
  1. What does hashing a file and comparing the digest before and after transfer verify? → Integrity of the file
  2. Which design pattern decouples a service that produces events from services that consume them, allowing consumers to process work asynchronously? → Publish-subscribe messaging
  3. Which data structure is most appropriate for implementing an undo feature in a text editor? → Stack
  4. Which metric best captures how a system's response time degrades for its slowest requests? → Tail latency, such as the 99th percentile
  5. What does a Translation Lookaside Buffer (TLB) cache? → Recent virtual-to-physical address translations
  6. An attacker intercepts and secretly relays communication between two parties who believe they are talking directly. What is this attack called? → Man-in-the-middle attack
  7. What is a fundamental principle of DevOps & Deployment in Computer Science practice? → Following established standards and best practices
  8. Which tool is commonly used for root cause analysis in Computer Science? → Fishbone (Ishikawa) diagram
  9. In the context of high availability, what does an SLA of 99.9% uptime allow in downtime per year (approximately)? → About 8.8 hours
  10. What condition must hold, among others, for a deadlock to occur in a system? → Circular wait among processes holding resources
  11. A string is built by concatenating inside a loop in a language with immutable strings, resulting in O(n²) behavior. What is the standard fix? → Use a string builder or buffer and join once at the end
  12. Which of the following problems is a classic application of dynamic programming? → Longest common subsequence
  13. A JWT (JSON Web Token) is signed but not encrypted. What does this imply? → Anyone can read the token's payload, but tampering is detectable via the signature
  14. What does the SQL statement 'DELETE FROM orders;' do without a WHERE clause? → Removes all rows from the orders table
  15. Which memory allocation strategy searches the entire free list to find the smallest hole that fits the request? → Best fit
  16. Which approach best supports quality outcomes in Security & Authentication for Computer Science? → Systematic application of evidence-based methods
  17. A web application makes 50 separate small database queries to render one page. What is the most effective optimization? → Batch the queries into fewer round trips
  18. In a microservices system, an API gateway primarily serves to: → Provide a single entry point that routes requests to backend services
  19. Which type of pipeline hazard occurs when an instruction depends on the result of a previous instruction that has not yet completed? → Data hazard
  20. Which technique reduces function call overhead by replacing a call with the function's body at compile time? → Inlining
  21. What is the height of a complete binary tree containing n nodes? → O(log n)
  22. A subnet uses the mask 255.255.255.192. How many usable host addresses does it provide? → 62
  23. Which programming paradigm focuses on objects and their interactions? → Object-oriented programming (OOP)
  24. What does the 'exec()' family of system calls do in Unix/Linux? → Replaces the current process's memory image with a new program while retaining the PID
  25. Which security principle states that users should be granted only the permissions necessary to perform their job? → Least privilege
  26. A company must ensure customer data remains within the country where it was collected due to legal requirements. This concern is called what? → Data sovereignty
  27. Which algorithm design technique does merge sort primarily use? → Divide and conquer
  28. Which HTTP status code correctly distinguishes 'authenticated but not allowed' from 'not authenticated'? → 403 Forbidden versus 401 Unauthorized
  29. Which of the following best describes an API (Application Programming Interface)? → A set of functions and protocols for communication
  30. In a B-tree index, why are B-trees preferred over binary search trees for disk-based databases? → High fanout reduces the number of disk reads needed
Was this helpful?