Design and Analysis of Algorithms Certification — Questions and Answers
Question 1: Which quantitative technique calculates the expected value of additional information to decide whether further risk analysis is worth its cost?
- Earned Value Management (EVM)
- Net Present Value (NPV)
- Return on Security Investment (ROSI)
- Expected Value of Perfect Information (EVPI) (Correct answer)
Correct answer: Expected Value of Perfect Information (EVPI)
EVPI quantifies the maximum amount an organization should pay for perfect information about an uncertain outcome, bounding the value of further analysis.
Question 2: Which of the following sorting algorithms is NOT comparison-based?
- Counting Sort (Correct answer)
- Heap Sort
- Quick Sort
- Merge Sort
Correct answer: Counting Sort
Counting Sort uses element values as indices rather than comparing elements, allowing O(n+k) time complexity.
Question 3: What does 'explainability' specifically require of a high-risk algorithm under emerging AI regulations?
- That the algorithm can explain human emotions
- That the algorithm self-documents its code
- That all training data is publicly listed
- That stakeholders can understand why the algorithm produced a given output (Correct answer)
Correct answer: That stakeholders can understand why the algorithm produced a given output
Explainability requires that the reasoning behind an algorithm's output can be communicated in understandable terms to affected individuals or auditors.
Question 4: What is a risk mitigation strategy in Algorithms practice?
- Transferring all responsibility
- Only addressing risks after they occur
- Implementing controls that reduce the likelihood or impact of identified risks (Correct answer)
- Ignoring low-probability risks
Correct answer: Implementing controls that reduce the likelihood or impact of identified risks
This is fundamental to Algorithms practice. Implementing controls that reduce the likelihood or impact of identified risks represents the professional standard for risk management in the Algorithms certification framework.
Question 5: What is the Rod Cutting problem in DP?
- Finding the shortest rod path in a graph
- Maximizing revenue by cutting a rod into pieces with given prices (Correct answer)
- Sorting rod lengths optimally
- Minimizing waste when cutting material
Correct answer: Maximizing revenue by cutting a rod into pieces with given prices
Rod Cutting determines how to cut a rod of length n into pieces to maximize total revenue, given a price table for each possible length.
Question 6: In a depth-first search (DFS) on a graph, which data structure is implicitly used?
- Heap
- Stack (Correct answer)
- Queue
- Deque
Correct answer: Stack
DFS uses a stack (either explicitly or via the call stack in recursion) to track the traversal path.
Question 7: What distinguishes greedy algorithms from dynamic programming?
- DP uses more memory than greedy in all cases
- Greedy is always faster than DP
- Greedy uses recursion; DP does not
- Greedy makes locally optimal choices without revisiting; DP considers all subproblems (Correct answer)
Correct answer: Greedy makes locally optimal choices without revisiting; DP considers all subproblems
Greedy algorithms commit to the locally best choice at each step without reconsidering, while DP explores all subproblem combinations to guarantee global optimality.
Question 8: A CDN caches only the most recently requested files and evicts the oldest when full. What cache eviction policy is this?
- Least Frequently Used (LFU)
- Random Replacement
- Least Recently Used (LRU) (Correct answer)
- First In First Out (FIFO)
Correct answer: Least Recently Used (LRU)
LRU evicts the item that was least recently accessed, keeping hot content in cache.
Question 9: How should an Algorithms professional respond to a compliance violation?
- Conceal it if minor
- Report it promptly, investigate the root cause, and implement corrective actions (Correct answer)
- Blame the regulatory framework
- Wait for an external audit to find it
Correct answer: Report it promptly, investigate the root cause, and implement corrective actions
This is fundamental to Algorithms practice. Report it promptly, investigate the root cause, and implement corrective actions represents the professional standard for regulatory in the Algorithms certification framework.
Question 10: What is the difference between top-down and bottom-up dynamic programming?
- Top-down is faster; bottom-up uses more memory
- Top-down uses memoized recursion; bottom-up fills a table iteratively (Correct answer)
- Top-down uses iteration; bottom-up uses recursion
- They are identical in approach
Correct answer: Top-down uses memoized recursion; bottom-up fills a table iteratively
Top-down DP uses recursive calls with memoization, while bottom-up DP iteratively fills a table from smallest subproblems to the full problem.
Question 11: A blockchain validates that no transaction has been tampered with by chaining block hashes together. What property does this exploit?
- Greedy optimality
- Amortized complexity
- Collision resistance of cryptographic hash functions (Correct answer)
- Graph planarity
Correct answer: Collision resistance of cryptographic hash functions
Cryptographic hash collision resistance means altering any block changes its hash, breaking the chain and revealing tampering.
Question 12: How should Algorithms professionals evaluate new technology tools?
- Adopt all new technology immediately
- Avoid all new technology
- Assess functionality, reliability, security, cost-effectiveness, and alignment with professional needs (Correct answer)
- Wait until competitors adopt first
Correct answer: Assess functionality, reliability, security, cost-effectiveness, and alignment with professional needs
This is fundamental to Algorithms practice. Assess functionality, reliability, security, cost-effectiveness, and alignment with professional needs represents the professional standard for technology in the Algorithms certification framework.
Question 13: Which of the following best reflects professional competency in algorithm selection for a streaming data problem?
- Choose algorithms designed for online or streaming processing that operate within fixed memory bounds (Correct answer)
- Choose batch algorithms and buffer all data before processing
- Always use approximate algorithms for streams since accuracy is unimportant
- Sort the stream before applying any algorithm
Correct answer: Choose algorithms designed for online or streaming processing that operate within fixed memory bounds
Streaming problems require algorithms that process data incrementally within bounded memory, making online algorithm design a distinct professional competency.
Question 14: What is the purpose of the Union-Find (Disjoint Set Union) data structure?
- Sorting elements in O(n log n)
- Finding shortest paths in a graph
- Efficiently tracking connected components and merging sets (Correct answer)
- Balancing binary search trees
Correct answer: Efficiently tracking connected components and merging sets
Union-Find supports near-O(1) operations to merge sets and determine if two elements belong to the same component.
Question 15: The Bellman-Ford algorithm is an example of which algorithmic paradigm?
- Divide and Conquer
- Dynamic Programming (Correct answer)
- Backtracking
- Greedy
Correct answer: Dynamic Programming
Bellman-Ford uses DP by iteratively relaxing edges, building shortest-path estimates that improve with each of the n−1 passes.
Question 16: What role does peer review play in Algorithms practice?
- It is only for beginners
- It provides quality assurance and professional development through collegial evaluation (Correct answer)
- It replaces formal certification
- It creates unnecessary competition
Correct answer: It provides quality assurance and professional development through collegial evaluation
This is fundamental to Algorithms practice. It provides quality assurance and professional development through collegial evaluation represents the professional standard for professional standards in the Algorithms certification framework.
Question 17: Which approach verifies that an algorithm produces the same result when applied multiple times to the same input?
- Idempotency testing (Correct answer)
- Integration testing
- Concurrency testing
- Stress testing
Correct answer: Idempotency testing
Idempotency testing confirms that repeated invocations with identical inputs yield identical outputs, which is critical for functions that must be safely retried.
Question 18: A client requests an algorithm that guarantees results in under 1 millisecond for all inputs. An engineer knows this is impossible for their problem. What is the professional response?
- Explain the theoretical limits, propose the best achievable bound, and document the trade-offs (Correct answer)
- Refuse the project entirely
- Promise the guarantee and optimize later
- Deliver any algorithm and mark the requirement as out-of-scope
Correct answer: Explain the theoretical limits, propose the best achievable bound, and document the trade-offs
Professional integrity requires honest communication about theoretical limits along with constructive alternatives rather than overpromising unachievable guarantees.
Question 19: A database executes a JOIN between two tables. Which algorithmic technique improves performance when both tables are already sorted on the join key?
- Hash join
- Nested loop join
- Radix join
- Merge join (Correct answer)
Correct answer: Merge join
Merge join exploits sorted order to scan both tables linearly, achieving O(n + m) instead of O(n x m).
Question 20: Which DP variant fills the table in a specific order to avoid computing subproblems before their dependencies are ready?
- Tabulation (bottom-up) (Correct answer)
- Greedy Fill
- Divide and Conquer
- Memoization (top-down)
Correct answer: Tabulation (bottom-up)
Tabulation (bottom-up DP) explicitly fills the table from base cases upward, ensuring all dependencies are computed before they are needed.
Question 21: What is the benefit of interdisciplinary collaboration in Algorithms practice?
- It slows down decision making
- It brings diverse expertise and perspectives that improve outcomes and innovation (Correct answer)
- It creates confusion
- It is only for complex projects
Correct answer: It brings diverse expertise and perspectives that improve outcomes and innovation
This is fundamental to Algorithms practice. It brings diverse expertise and perspectives that improve outcomes and innovation represents the professional standard for practical in the Algorithms certification framework.
Question 22: A search engine indexes billions of web pages and must return relevant results in milliseconds. Which core data structure underpins inverted index lookups?
- Minimum spanning tree
- Hash map from term to posting list (Correct answer)
- Max-heap
- Stack
Correct answer: Hash map from term to posting list
An inverted index maps each term to a list of documents containing it; hash maps give O(1) term lookup to retrieve posting lists.
Question 23: Which practice best upholds professional standards when documenting a recursive algorithm?
- Document the recurrence relation, base cases, invariants, and the closed-form complexity (Correct answer)
- Document only the base case since recursion is self-explanatory
- Omit complexity since the compiler optimizes recursion
- Copy the Wikipedia description verbatim
Correct answer: Document the recurrence relation, base cases, invariants, and the closed-form complexity
Complete documentation of recurrence, base cases, and derived complexity lets maintainers understand, audit, and optimize the algorithm without reverse-engineering it.
Question 24: A ride-sharing app matches riders to the nearest available driver. What class of algorithm solves this assignment problem optimally?
- Bipartite matching algorithm (Correct answer)
- Radix Sort
- Quicksort
- Depth-First Search
Correct answer: Bipartite matching algorithm
Bipartite matching algorithms like the Hungarian method optimally pair riders and drivers across two disjoint sets.
Question 25: Which algorithm is used to find an Euler circuit in a graph?
- Fleury's Algorithm (Correct answer)
- Prim's Algorithm
- Bellman-Ford
- Kruskal's Algorithm
Correct answer: Fleury's Algorithm
Fleury's algorithm constructs an Euler circuit by avoiding bridges (edges whose removal disconnects the graph) when choosing the next edge.
Question 26: The data for an array utilized in a program will be saved in.
- Dope vector (Correct answer)
- Symbol table
- Activation table
- Register vector
Correct answer: Dope vector
A dope vector is a data structure used by compilers and runtime systems to store essential metadata about an array. This information typically includes the array's base address, its dimensions, and the bounds for each dimension. While the actual array elements reside in memory, the dope vector enables the program to correctly access and manipulate array data, especially for dynamic or multi-dimensional arrays.
Question 27: The Edit Distance (Levenshtein) DP algorithm computes the minimum number of which operations to transform one string to another?
- Character swaps only
- Transpositions and reversals
- Insertions and deletions only
- Insertions, deletions, and substitutions (Correct answer)
Correct answer: Insertions, deletions, and substitutions
Edit Distance counts the minimum insertions, deletions, and substitutions required to transform one string into another, computed in O(mn) by DP.
Question 28: A web browser maintains a Back button history. Pressing Back retrieves the previous page. Which abstract data type models this?
- Queue
- Deque
- Stack (Correct answer)
- Priority Queue
Correct answer: Stack
A stack's LIFO (last-in, first-out) behavior perfectly models browser history where the most recently visited page is retrieved first.
Question 29: A mapping app must connect all cities in a region with roads using the minimum total cable length. Which algorithm solves this?
- Bellman-Ford
- Kruskal's Minimum Spanning Tree (Correct answer)
- Counting Sort
- Binary Search
Correct answer: Kruskal's Minimum Spanning Tree
Kruskal's algorithm builds a minimum spanning tree by greedily adding the shortest edges that don't form a cycle.
Question 30: In algorithmic trading, which risk control mechanism automatically halts trading when losses exceed a predefined threshold?
- Stop-loss order
- Kill switch
- Circuit breaker
- All of the above (Correct answer)
Correct answer: All of the above
Stop-loss orders, circuit breakers, and kill switches are all risk control mechanisms used in algorithmic trading to cap losses automatically.
Question 31: What is the purpose of regular risk reviews in Algorithms practice?
- To reduce workload
- To satisfy auditors only
- To generate reports
- To identify new risks, evaluate control effectiveness, and update mitigation strategies (Correct answer)
Correct answer: To identify new risks, evaluate control effectiveness, and update mitigation strategies
This is fundamental to Algorithms practice. To identify new risks, evaluate control effectiveness, and update mitigation strategies represents the professional standard for risk management in the Algorithms certification framework.
Question 32: Which testing technique executes code without knowledge of internal structure, focusing solely on inputs and outputs?
- Black-box testing (Correct answer)
- Mutation testing
- Gray-box testing
- White-box testing
Correct answer: Black-box testing
Black-box testing treats the system as opaque, validating behavior purely from external inputs and expected outputs.
Question 33: A junior engineer on your team proposes an O(n log n) solution to a problem that you know requires Ω(n log n) in the comparison model. What is the professionally appropriate response?
- Explain the lower bound, praise the optimal solution, and document the proof for the team (Correct answer)
- Assign extra review work as a learning exercise
- Say the solution is wrong since it didn't reach O(n)
- Replace their solution with your own without explanation
Correct answer: Explain the lower bound, praise the optimal solution, and document the proof for the team
Recognizing an optimal solution and explaining the theoretical lower bound is a professional teaching moment that builds team competency.
Question 34: An algorithm is described as O(n!) in time complexity. What category does this fall into?
- Factorial (Correct answer)
- Polynomial
- Exponential
- Logarithmic
Correct answer: Factorial
O(n!) is factorial complexity, which grows even faster than exponential (e.g., O(2ⁿ)) and is seen in brute-force permutation problems.
Question 35: What does it mean professionally for an algorithm to be 'production-ready' beyond just passing unit tests?
- It handles edge cases, adversarial inputs, has documented complexity, and is code-reviewed (Correct answer)
- It has been running for at least six months in staging
- It compiles without warnings
- It uses no third-party libraries
Correct answer: It handles edge cases, adversarial inputs, has documented complexity, and is code-reviewed
Production readiness encompasses correctness under adversarial conditions, documented behavior, complexity guarantees, and team review — not just basic test coverage.
Question 36: In the Longest Increasing Subsequence (LIS) problem, what is the time complexity of the DP approach?
- O(2ⁿ)
- O(n²) (Correct answer)
- O(n)
- O(n log n)
Correct answer: O(n²)
The standard DP approach for LIS checks all previous elements for each position, giving O(n²) time; a binary search optimization achieves O(n log n).
Question 37: What is the primary benefit of continuous integration (CI) for algorithm quality?
- Reducing the number of developers needed
- Speeding up algorithm execution in production
- Automatically running tests on every code commit to catch issues early (Correct answer)
- Eliminating the need for code reviews
Correct answer: Automatically running tests on every code commit to catch issues early
CI pipelines run the full test suite on each commit, catching defects immediately after they are introduced rather than later in the cycle.
Question 38: A peer-to-peer file-sharing network uses a distributed hash table (DHT) to locate which peer holds a file. The average lookup cost in a Chord DHT of n nodes is:
- O(log n) (Correct answer)
- O(n²)
- O(n)
- O(1)
Correct answer: O(log n)
Chord uses a finger table so each lookup hop halves the remaining search space, achieving O(log n) hops to locate any key.
Question 39: How do Algorithms professionals evaluate research quality?
- Research quality cannot be evaluated
- By the reputation of the author only
- By publication date only
- By assessing methodology, sample size, peer review status, and relevance to practice (Correct answer)
Correct answer: By assessing methodology, sample size, peer review status, and relevance to practice
This is fundamental to Algorithms practice. By assessing methodology, sample size, peer review status, and relevance to practice represents the professional standard for research in the Algorithms certification framework.
Question 40: What is the time complexity of the classic 0/1 Knapsack DP solution with n items and capacity W?
- O(nW) (Correct answer)
- O(n²)
- O(n log W)
- O(n + W)
Correct answer: O(nW)
The 0/1 Knapsack DP fills an n×W table where each cell takes O(1) time, giving O(nW) overall complexity.
Question 41: When communicating the risk of technical debt caused by a suboptimal algorithm, which approach is most persuasive to business stakeholders?
- Quantify future costs in terms of engineering hours or revenue impact (Correct answer)
- Request immediate budget for a full rewrite
- Share academic papers on algorithm efficiency
- Explain the Big-O complexity in detail
Correct answer: Quantify future costs in terms of engineering hours or revenue impact
Business stakeholders respond to financial framing more than technical metrics.
Question 42: What is memoization in the context of dynamic programming?
- Converting recursion to iteration
- Sorting subproblems before solving
- Caching results of subproblems to avoid redundant computation (Correct answer)
- Splitting the problem into independent parts
Correct answer: Caching results of subproblems to avoid redundant computation
Memoization stores the result of each subproblem the first time it is solved so future calls return the cached answer immediately.
Question 43: In algorithm quality assurance, what does 'code coverage' measure?
- Ratio of comments to code
- Percentage of source code executed during testing (Correct answer)
- Lines of code written per hour
- Number of bugs found per line
Correct answer: Percentage of source code executed during testing
Code coverage measures what fraction of the codebase is actually executed by the test suite, guiding where more tests are needed.
Question 44: In a DP solution, what is the base case?
- The most complex subproblem
- The final answer to the full problem
- The greedy initial choice
- The trivially solvable smallest subproblem that terminates recursion (Correct answer)
Correct answer: The trivially solvable smallest subproblem that terminates recursion
Base cases are the simplest subproblems with known answers (e.g., dp[0] = 0) that stop recursion and seed the rest of the DP table.
Question 45: A logistics company solves a 'vehicle routing problem' where multiple trucks deliver to many locations. The real-world approach typically uses:
- Bubble sort on distances
- Heuristics and metaheuristics (e.g., simulated annealing, genetic algorithms) (Correct answer)
- Exact brute-force enumeration
- Single-source BFS from depot
Correct answer: Heuristics and metaheuristics (e.g., simulated annealing, genetic algorithms)
VRP is NP-hard; practical solutions rely on metaheuristics that find near-optimal routes in acceptable time for large instances.
Question 46: What is the space complexity of the standard LCS DP solution, and how can it be optimized?
- O(mn²); optimized to O(mn)
- O(m+n); no optimization possible
- O(1); already optimal
- O(mn); optimized to O(min(m,n)) using two rows (Correct answer)
Correct answer: O(mn); optimized to O(min(m,n)) using two rows
Standard LCS uses an O(mn) table, but since each row only depends on the previous row, it can be reduced to O(min(m,n)) space.
Question 47: What is 'differential privacy' and why is it relevant to algorithmic compliance?
- A legal standard for data breach notification
- A pricing model for cloud algorithm deployment
- A technique that adds statistical noise to protect individual data privacy (Correct answer)
- A method to speed up machine learning training
Correct answer: A technique that adds statistical noise to protect individual data privacy
Differential privacy adds calibrated noise to data or outputs so that individual records cannot be identified, helping comply with privacy regulations.
Question 48: What are the two key properties a problem must have to be solvable with dynamic programming?
- Optimal substructure and overlapping subproblems (Correct answer)
- Greedy choice and independence
- Recursion and memoization
- Linearity and monotonicity
Correct answer: Optimal substructure and overlapping subproblems
Dynamic programming applies when a problem has optimal substructure (optimal solution built from optimal sub-solutions) and overlapping subproblems (same subproblems recur).
Question 49: An undo feature in a drawing app lets users redo actions after undoing them. Which data structure combination supports both undo and redo?
- Two stacks (Correct answer)
- A priority queue
- One queue
- A circular buffer
Correct answer: Two stacks
Two stacks, one for undo history and one for redo history, efficiently support both operations with O(1) push and pop.
Question 50: Which DP problem asks for the length of the longest subsequence common to two strings?
- Edit Distance
- Longest Increasing Subsequence
- Longest Common Subsequence (Correct answer)
- Coin Change
Correct answer: Longest Common Subsequence
The Longest Common Subsequence (LCS) problem finds the longest sequence present in both strings in the same order, solved in O(mn) by DP.
Question 51: A web crawler must visit billions of URLs without revisiting any. Which data structure most efficiently tracks visited URLs with minimal memory?
- Balanced BST of URLs
- Max-heap of URL hashes
- Bloom filter (Correct answer)
- Array of all visited URLs
Correct answer: Bloom filter
A Bloom filter uses multiple hash functions and a compact bit array to answer membership queries in O(1) with minimal memory, accepting a small false-positive rate.
Design and Analysis of Algorithms Certification
Assesses knowledge of algorithm design, analysis, and implementation covering sorting, searching, dynamic programming, graph algorithms, and computational complexity. Validates competency in applying algorithmic thinking to solve real-world computational problems.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds