Q. Which data structure would you use to implement a function that needs to backtrack?
A.
Array
B.
Stack
C.
Queue
D.
Linked List
Show solution
Solution
A stack is ideal for backtracking as it allows you to return to the previous state easily.
Correct Answer:
B
— Stack
Learn More →
Q. Which data structure would you use to implement a queue?
A.
Array
B.
Linked List
C.
Stack
D.
Both Array and Linked List
Show solution
Solution
Both arrays and linked lists can be used to implement a queue, depending on the requirements for size and performance.
Correct Answer:
D
— Both Array and Linked List
Learn More →
Q. Which data structure would you use to implement a recursive algorithm iteratively?
A.
Array
B.
Linked List
C.
Stack
D.
Queue
Show solution
Solution
A stack is used to implement a recursive algorithm iteratively, as it can keep track of function calls and local variables.
Correct Answer:
C
— Stack
Learn More →
Q. Which data structure would you use to implement a task scheduling system?
A.
Stack
B.
Queue
C.
Linked List
D.
Array
Show solution
Solution
A queue is suitable for task scheduling systems as it processes tasks in the order they arrive.
Correct Answer:
B
— Queue
Learn More →
Q. Which deployment strategy allows for gradual rollout of a new model version?
A.
Blue-green deployment
B.
A/B testing
C.
Canary deployment
D.
Shadow deployment
Show solution
Solution
Canary deployment allows for a gradual rollout of a new model version to a small subset of users before full deployment.
Correct Answer:
C
— Canary deployment
Learn More →
Q. Which deployment strategy allows for gradual rollout of a new model?
A.
Blue-green deployment
B.
Canary deployment
C.
Rolling deployment
D.
All of the above
Show solution
Solution
All of the mentioned strategies (blue-green, canary, and rolling deployments) allow for gradual rollout of new models to minimize risk.
Correct Answer:
D
— All of the above
Learn More →
Q. Which deployment strategy allows for quick rollback in case of issues?
A.
Blue-Green Deployment
B.
Canary Deployment
C.
Rolling Deployment
D.
All of the above
Show solution
Solution
Blue-Green Deployment allows for quick rollback by maintaining two identical environments, enabling seamless switching between them if issues arise.
Correct Answer:
A
— Blue-Green Deployment
Learn More →
Q. Which deployment strategy involves gradually rolling out a model to a subset of users before full deployment?
A.
Blue-green deployment
B.
Canary deployment
C.
Rolling deployment
D.
A/B testing
Show solution
Solution
Canary deployment is a strategy where a new model is gradually rolled out to a small subset of users to monitor its performance before full deployment.
Correct Answer:
B
— Canary deployment
Learn More →
Q. Which deployment strategy involves gradually rolling out a model to a subset of users?
A.
Blue-green deployment
B.
Canary deployment
C.
A/B testing
D.
Shadow deployment
Show solution
Solution
Canary deployment involves gradually rolling out a new model to a small subset of users to monitor its performance before a full rollout.
Correct Answer:
B
— Canary deployment
Learn More →
Q. Which deployment strategy involves gradually rolling out a new model to a subset of users?
A.
Blue-green deployment
B.
Canary deployment
C.
Rolling deployment
D.
Shadow deployment
Show solution
Solution
Canary deployment gradually rolls out a new model to a small subset of users to monitor its performance before a full rollout.
Correct Answer:
B
— Canary deployment
Learn More →
Q. Which device operates at the Data Link Layer of the OSI model?
A.
Router
B.
Switch
C.
Hub
D.
Gateway
Show solution
Solution
A switch operates at the Data Link Layer (Layer 2) of the OSI model, forwarding frames based on MAC addresses.
Correct Answer:
B
— Switch
Learn More →
Q. Which distance metric is commonly used in K-means clustering?
A.
Manhattan distance
B.
Cosine similarity
C.
Euclidean distance
D.
Hamming distance
Show solution
Solution
K-means typically uses Euclidean distance to measure the distance between data points and centroids.
Correct Answer:
C
— Euclidean distance
Learn More →
Q. Which dynamic programming approach is used to find the longest common subsequence?
A.
Top-down
B.
Bottom-up
C.
Greedy
D.
Brute force
Show solution
Solution
The longest common subsequence problem is typically solved using a bottom-up dynamic programming approach.
Correct Answer:
B
— Bottom-up
Learn More →
Q. Which dynamic programming approach is used to solve the 0/1 Knapsack problem?
A.
Top-down approach with memoization
B.
Bottom-up approach with tabulation
C.
Greedy approach
D.
Brute force approach
Show solution
Solution
The 0/1 Knapsack problem can be solved using a bottom-up dynamic programming approach with tabulation, which builds up solutions to subproblems.
Correct Answer:
B
— Bottom-up approach with tabulation
Learn More →
Q. Which dynamic programming approach is used to solve the Coin Change problem?
A.
Top-down
B.
Bottom-up
C.
Greedy
D.
Brute force
Show solution
Solution
The Coin Change problem can be solved using a bottom-up dynamic programming approach, where solutions to smaller subproblems are built up to solve larger problems.
Correct Answer:
B
— Bottom-up
Learn More →
Q. Which dynamic programming approach is used to solve the Edit Distance problem?
A.
Top-down
B.
Bottom-up
C.
Both top-down and bottom-up
D.
Greedy approach
Show solution
Solution
Both top-down (with memoization) and bottom-up approaches can be used to solve the Edit Distance problem.
Correct Answer:
C
— Both top-down and bottom-up
Learn More →
Q. Which dynamic programming approach is used to solve the Knapsack problem?
A.
Top-down approach
B.
Bottom-up approach
C.
Greedy approach
D.
Brute force approach
Show solution
Solution
The Knapsack problem can be solved using a bottom-up dynamic programming approach, which builds up solutions to subproblems.
Correct Answer:
B
— Bottom-up approach
Learn More →
Q. Which dynamic programming approach is used to solve the Longest Common Subsequence problem?
A.
Top-down
B.
Bottom-up
C.
Greedy
D.
Brute force
Show solution
Solution
The Longest Common Subsequence problem is typically solved using a bottom-up dynamic programming approach.
Correct Answer:
B
— Bottom-up
Learn More →
Q. Which dynamic programming approach is used to solve the problem of finding the minimum edit distance between two strings?
A.
Bottom-up
B.
Top-down
C.
Greedy
D.
Brute force
Show solution
Solution
The minimum edit distance problem is typically solved using a top-down dynamic programming approach.
Correct Answer:
B
— Top-down
Learn More →
Q. Which dynamic programming problem involves finding the longest common subsequence?
A.
Edit Distance
B.
Longest Increasing Subsequence
C.
Longest Common Subsequence
D.
0/1 Knapsack
Show solution
Solution
The problem of finding the longest common subsequence is a classic dynamic programming problem.
Correct Answer:
C
— Longest Common Subsequence
Learn More →
Q. Which dynamic programming problem involves finding the longest increasing subsequence?
A.
Longest Common Subsequence
B.
Edit Distance
C.
Longest Increasing Subsequence
D.
Matrix Chain Multiplication
Show solution
Solution
The problem of finding the longest increasing subsequence is a classic example of a problem that can be solved using dynamic programming.
Correct Answer:
C
— Longest Increasing Subsequence
Learn More →
Q. Which dynamic programming problem involves finding the longest subsequence in a sequence?
A.
Longest Common Subsequence
B.
Longest Increasing Subsequence
C.
Edit Distance
D.
Knapsack Problem
Show solution
Solution
The Longest Increasing Subsequence problem involves finding the longest subsequence in a sequence where the elements are in increasing order.
Correct Answer:
B
— Longest Increasing Subsequence
Learn More →
Q. Which dynamic programming problem involves finding the minimum cost path in a grid?
A.
Longest common subsequence
B.
Edit distance
C.
Minimum path sum
D.
Coin change
Show solution
Solution
The minimum path sum problem involves finding the minimum cost path in a grid from the top-left to the bottom-right corner.
Correct Answer:
C
— Minimum path sum
Learn More →
Q. Which dynamic programming problem involves finding the minimum cost to reach the last cell in a grid?
A.
Longest increasing subsequence.
B.
Edit distance.
C.
Minimum path sum.
D.
Subset sum problem.
Show solution
Solution
The minimum path sum problem involves finding the minimum cost to reach the last cell in a grid by summing the weights of the cells.
Correct Answer:
C
— Minimum path sum.
Learn More →
Q. Which dynamic programming problem involves finding the minimum number of coins needed to make a certain amount?
A.
Longest Increasing Subsequence
B.
Coin Change Problem
C.
Edit Distance
D.
Fibonacci Sequence
Show solution
Solution
The Coin Change Problem is a classic dynamic programming problem that involves finding the minimum number of coins needed to make a certain amount of money.
Correct Answer:
B
— Coin Change Problem
Learn More →
Q. Which dynamic programming problem involves making decisions based on previous decisions?
A.
Fibonacci sequence
B.
Longest increasing subsequence
C.
Coin change problem
D.
Matrix chain multiplication
Show solution
Solution
Matrix chain multiplication involves making decisions based on previous decisions to determine the optimal way to multiply a chain of matrices.
Correct Answer:
D
— Matrix chain multiplication
Learn More →
Q. Which dynamic programming problem involves partitioning a set into two subsets with equal sum?
A.
Subset Sum Problem
B.
Longest Common Subsequence
C.
Fibonacci Sequence
D.
Coin Change Problem
Show solution
Solution
The Subset Sum Problem involves partitioning a set into two subsets such that the sum of elements in both subsets is equal, and it can be solved using dynamic programming.
Correct Answer:
A
— Subset Sum Problem
Learn More →
Q. Which dynamic programming technique builds solutions from the ground up?
A.
Top-down
B.
Bottom-up
C.
Greedy
D.
Brute force
Show solution
Solution
The bottom-up technique builds solutions from the ground up by solving smaller subproblems first.
Correct Answer:
B
— Bottom-up
Learn More →
Q. Which dynamic programming technique builds the solution from the ground up?
A.
Top-down approach
B.
Bottom-up approach
C.
Recursive approach
D.
Iterative approach
Show solution
Solution
The bottom-up approach builds the solution from the smallest subproblems up to the larger problem, ensuring all necessary subproblem solutions are available.
Correct Answer:
B
— Bottom-up approach
Learn More →
Q. Which dynamic programming technique is used to solve the Coin Change problem?
A.
Tabulation
B.
Greedy
C.
Backtracking
D.
Brute Force
Show solution
Solution
The Coin Change problem can be efficiently solved using the tabulation technique of dynamic programming.
Correct Answer:
A
— Tabulation
Learn More →
Showing 2221 to 2250 of 3237 (108 Pages)