Q. Which of the following algorithms uses dynamic programming to find the shortest path in a graph?
A.
Dijkstra's Algorithm
B.
Bellman-Ford Algorithm
C.
A* Search
D.
Depth First Search
Show solution
Solution
The Bellman-Ford Algorithm uses dynamic programming to find the shortest path in a graph with negative weights.
Correct Answer:
B
— Bellman-Ford Algorithm
Learn More →
Q. Which of the following algorithms uses dynamic programming to solve the problem of matrix chain multiplication?
A.
Dijkstra's Algorithm
B.
Floyd-Warshall Algorithm
C.
Bellman-Ford Algorithm
D.
Matrix Chain Order
Show solution
Solution
The Matrix Chain Order algorithm uses dynamic programming to find the most efficient way to multiply a given sequence of matrices.
Correct Answer:
D
— Matrix Chain Order
Learn More →
Q. Which of the following algorithms uses dynamic programming to solve the problem of finding the shortest path in a weighted graph?
A.
Dijkstra's Algorithm
B.
Bellman-Ford Algorithm
C.
A* Search
D.
Depth-First Search
Show solution
Solution
The Bellman-Ford Algorithm uses dynamic programming to find the shortest path in a weighted graph, especially when negative weights are present.
Correct Answer:
B
— Bellman-Ford Algorithm
Learn More →
Q. Which of the following algorithms uses dynamic programming to solve the problem?
A.
Dijkstra's Algorithm
B.
Merge Sort
C.
Floyd-Warshall Algorithm
D.
Quick Sort
Show solution
Solution
The Floyd-Warshall Algorithm uses dynamic programming to find the shortest paths in a weighted graph.
Correct Answer:
C
— Floyd-Warshall Algorithm
Learn More →
Q. Which of the following applications can be efficiently solved using a stack?
A.
Undo functionality in text editors
B.
Breadth-first search in graphs
C.
Finding the shortest path in a weighted graph
D.
Sorting an array
Show solution
Solution
Stacks are commonly used for implementing undo functionality in text editors, as they allow for easy backtracking of actions.
Correct Answer:
A
— Undo functionality in text editors
Learn More →
Q. Which of the following applications can be solved using BFS?
A.
Finding connected components
B.
Topological sorting
C.
Cycle detection
D.
Finding strongly connected components
Show solution
Solution
BFS can be used to find connected components in an undirected graph.
Correct Answer:
A
— Finding connected components
Learn More →
Q. Which of the following applications can benefit from clustering?
A.
Customer segmentation
B.
Spam detection
C.
Image classification
D.
Time series forecasting
Show solution
Solution
Customer segmentation is a common application of clustering, where customers are grouped based on purchasing behavior.
Correct Answer:
A
— Customer segmentation
Learn More →
Q. Which of the following applications can benefit from Dijkstra's algorithm?
A.
GPS navigation systems
B.
Sorting large datasets
C.
Finding duplicates in a list
D.
Binary search in a sorted array
Show solution
Solution
GPS navigation systems can benefit from Dijkstra's algorithm as it helps in calculating the shortest routes between locations.
Correct Answer:
A
— GPS navigation systems
Learn More →
Q. Which of the following applications can Dijkstra's algorithm be used for?
A.
Finding the minimum spanning tree
B.
Routing in computer networks
C.
Sorting a list of numbers
D.
Searching for an element in a database
Show solution
Solution
Dijkstra's algorithm is commonly used in routing algorithms for computer networks to find the shortest path for data packets.
Correct Answer:
B
— Routing in computer networks
Learn More →
Q. Which of the following applications can utilize binary search?
A.
Finding the first occurrence of a number
B.
Finding the last occurrence of a number
C.
Finding the square root of a number
D.
All of the above
Show solution
Solution
Binary search can be adapted for various applications, including finding occurrences and calculating square roots.
Correct Answer:
D
— All of the above
Learn More →
Q. Which of the following applications is best suited for AVL trees?
A.
Database indexing.
B.
Memory management.
C.
Real-time applications.
D.
Static data storage.
Show solution
Solution
AVL trees are well-suited for database indexing where frequent searches are required due to their balanced nature.
Correct Answer:
A
— Database indexing.
Learn More →
Q. Which of the following applications is NOT suitable for linear regression?
A.
Predicting house prices based on features
B.
Estimating the impact of temperature on ice cream sales
C.
Classifying images into categories
D.
Forecasting stock prices based on historical data
Show solution
Solution
Classifying images into categories is not suitable for linear regression, as it is a classification task rather than a regression task.
Correct Answer:
C
— Classifying images into categories
Learn More →
Q. Which of the following applications is well-suited for SVM?
A.
Image classification
B.
Time series forecasting
C.
Text generation
D.
Reinforcement learning
Show solution
Solution
SVM is well-suited for image classification tasks due to its effectiveness in high-dimensional spaces.
Correct Answer:
A
— Image classification
Learn More →
Q. Which of the following assumptions is NOT required for linear regression?
A.
Linearity
B.
Homoscedasticity
C.
Independence of errors
D.
Normality of predictors
Show solution
Solution
While linear regression assumes linearity, homoscedasticity, and independence of errors, it does not require the predictors to be normally distributed.
Correct Answer:
D
— Normality of predictors
Learn More →
Q. Which of the following best describes 'A/B testing' in the context of model deployment?
A.
Training two models simultaneously
B.
Comparing two versions of a model to determine which performs better
C.
Deploying a model without testing
D.
None of the above
Show solution
Solution
A/B testing involves comparing two versions of a model to evaluate which one performs better in a real-world setting.
Correct Answer:
B
— Comparing two versions of a model to determine which performs better
Learn More →
Q. Which of the following best describes 'AutoML' in cloud ML services?
A.
Automated machine learning processes
B.
Manual model tuning
C.
Basic data visualization
D.
Static model training
Show solution
Solution
AutoML refers to automated machine learning processes that simplify the model development lifecycle.
Correct Answer:
A
— Automated machine learning processes
Learn More →
Q. Which of the following best describes 'model drift'?
A.
A decrease in model accuracy over time
B.
The process of retraining a model
C.
The introduction of new features
D.
A method for optimizing model performance
Show solution
Solution
Model drift refers to a decrease in model accuracy over time, often due to changes in the underlying data distribution.
Correct Answer:
A
— A decrease in model accuracy over time
Learn More →
Q. Which of the following best describes 'shadow deployment'?
A.
Deploying a model alongside the current model without affecting users
B.
Completely replacing the old model with a new one
C.
Deploying a model only during off-peak hours
D.
Using a model for training while another is in production
Show solution
Solution
Shadow deployment involves deploying a new model alongside the current model without affecting users, allowing for performance comparison without risk.
Correct Answer:
A
— Deploying a model alongside the current model without affecting users
Learn More →
Q. Which of the following best describes 'tokenization'?
A.
The process of generating machine code
B.
The process of converting source code into tokens
C.
The process of optimizing code
D.
The process of parsing syntax
Show solution
Solution
Tokenization is the process of converting source code into tokens that can be processed by the compiler.
Correct Answer:
B
— The process of converting source code into tokens
Learn More →
Q. Which of the following best describes a real-world application of queues?
A.
Call center systems
B.
File compression algorithms
C.
Sorting algorithms
D.
Binary search trees
Show solution
Solution
Queues are commonly used in call center systems to manage incoming calls in the order they are received.
Correct Answer:
A
— Call center systems
Learn More →
Q. Which of the following best describes a stack?
A.
First In First Out
B.
Last In First Out
C.
Random Access
D.
Ordered Collection
Show solution
Solution
A stack operates on a Last In First Out (LIFO) principle, meaning the last element added is the first one to be removed.
Correct Answer:
B
— Last In First Out
Learn More →
Q. Which of the following best describes inherited attributes?
A.
Attributes passed from parent to child nodes
B.
Attributes computed from child nodes
C.
Attributes that do not affect the translation
D.
Attributes that are only used in semantic actions
Show solution
Solution
Inherited attributes are attributes passed from parent to child nodes in syntax-directed translation.
Correct Answer:
A
— Attributes passed from parent to child nodes
Learn More →
Q. Which of the following best describes supervised learning?
A.
Learning from unlabeled data
B.
Learning from labeled data
C.
Learning without feedback
D.
Learning through reinforcement
Show solution
Solution
Supervised learning involves learning from labeled data, where the model is trained on input-output pairs.
Correct Answer:
B
— Learning from labeled data
Learn More →
Q. Which of the following best describes synthesized attributes?
A.
Attributes that are passed down from parent to child nodes
B.
Attributes that are computed from the values of child nodes
C.
Attributes that are used only during lexical analysis
D.
Attributes that are not used in syntax-directed translation
Show solution
Solution
Synthesized attributes are computed from the values of child nodes in the parse tree.
Correct Answer:
B
— Attributes that are computed from the values of child nodes
Learn More →
Q. Which of the following best describes the binary search algorithm?
A.
Iterative only
B.
Recursive only
C.
Both iterative and recursive
D.
None of the above
Show solution
Solution
Binary search can be implemented using both iterative and recursive approaches.
Correct Answer:
C
— Both iterative and recursive
Learn More →
Q. Which of the following best describes the concept of 'model drift'?
A.
The model's performance improves over time
B.
The model's predictions become less accurate due to changes in data distribution
C.
The model's architecture changes during deployment
D.
The model is retrained with new data
Show solution
Solution
Model drift occurs when the model's predictions become less accurate due to changes in the underlying data distribution over time.
Correct Answer:
B
— The model's predictions become less accurate due to changes in data distribution
Learn More →
Q. Which of the following best describes the divide-and-conquer approach used in binary search?
A.
Solving a problem by breaking it down into smaller subproblems
B.
Using a single loop to iterate through elements
C.
Recursively calling the same function without any condition
D.
Sorting the array before searching
Show solution
Solution
Binary search uses the divide-and-conquer strategy by dividing the array into halves to find the target.
Correct Answer:
A
— Solving a problem by breaking it down into smaller subproblems
Learn More →
Q. Which of the following best describes the iterative approach to binary search?
A.
Uses recursion
B.
Uses a loop to narrow down the search
C.
Requires additional data structures
D.
Always returns the first occurrence
Show solution
Solution
The iterative approach uses a loop to continuously narrow down the search range until the target is found or the range is empty.
Correct Answer:
B
— Uses a loop to narrow down the search
Learn More →
Q. Which of the following best describes the process of binary search?
A.
Iteratively checking each element
B.
Dividing the array into halves
C.
Sorting the array first
D.
Using a hash table
Show solution
Solution
Binary search works by dividing the array into halves to locate the target value.
Correct Answer:
B
— Dividing the array into halves
Learn More →
Q. Which of the following best describes the relationship between a lexer and a parser?
A.
The lexer generates machine code, while the parser checks syntax
B.
The lexer produces tokens, which the parser uses to build a syntax tree
C.
The lexer and parser perform the same function
D.
The parser generates tokens, while the lexer checks syntax
Show solution
Solution
The lexer produces tokens that the parser uses to build a syntax tree, making them complementary components in the compilation process.
Correct Answer:
B
— The lexer produces tokens, which the parser uses to build a syntax tree
Learn More →
Showing 2431 to 2460 of 3237 (108 Pages)