Q. What is a real-world application of the shortest path algorithms like Dijkstra's?
A.
Web page ranking
B.
Network routing
C.
Data compression
D.
Image processing
Solution
Network routing is a real-world application of shortest path algorithms, as they help determine the most efficient paths for data packets to travel across networks.
Q. What is a significant advantage of Red-Black trees over AVL trees?
A.
Faster search times
B.
Less strict balancing
C.
Easier implementation
D.
More memory usage
Solution
Red-Black trees are less strictly balanced than AVL trees, which can lead to faster insertion and deletion operations, making them more efficient in certain applications.
Q. What is dynamic programming primarily used for?
A.
To solve problems with overlapping subproblems
B.
To sort data efficiently
C.
To manage memory allocation
D.
To perform binary search
Solution
Dynamic programming is used to solve problems that can be broken down into overlapping subproblems, allowing for the reuse of previously computed results.
Correct Answer:
A
— To solve problems with overlapping subproblems
Q. What is intermediate code in the context of compilers?
A.
The final machine code
B.
A high-level representation of the source code
C.
An abstract representation of the program
D.
The source code itself
Solution
Intermediate code is an abstract representation of the program that is independent of the target machine, allowing for easier optimization and code generation.
Correct Answer:
C
— An abstract representation of the program
Q. What is model deployment in the context of machine learning?
A.
Training a model on a dataset
B.
Integrating a model into a production environment
C.
Evaluating model performance
D.
Collecting data for training
Solution
Model deployment refers to the process of integrating a machine learning model into a production environment where it can make predictions on new data.
Correct Answer:
B
— Integrating a model into a production environment
Q. What is multicollinearity in the context of linear regression?
A.
When the dependent variable is not normally distributed
B.
When independent variables are highly correlated with each other
C.
When the model has too many predictors
D.
When the residuals are not independent
Solution
Multicollinearity occurs when two or more independent variables in a regression model are highly correlated, which can affect the stability of coefficient estimates.
Correct Answer:
B
— When independent variables are highly correlated with each other
Q. What is overfitting in the context of training CNNs?
A.
When the model performs well on training data but poorly on unseen data
B.
When the model is too simple to capture the underlying patterns
C.
When the model has too few parameters
D.
When the model is trained on too much data
Solution
Overfitting occurs when the model performs well on training data but poorly on unseen data, indicating it has learned noise rather than the underlying pattern.
Correct Answer:
A
— When the model performs well on training data but poorly on unseen data
Q. What is the advantage of using an abstract syntax tree (AST) in intermediate code generation?
A.
It is easier to optimize than linear representations
B.
It directly represents machine instructions
C.
It simplifies lexical analysis
D.
It is more compact than binary code
Solution
An abstract syntax tree (AST) provides a hierarchical representation of the program structure, making it easier to apply optimizations compared to linear representations.
Correct Answer:
A
— It is easier to optimize than linear representations
Q. What is the assumption of homoscedasticity in linear regression?
A.
The residuals have constant variance across all levels of the independent variable
B.
The residuals are normally distributed
C.
The relationship between the independent and dependent variable is linear
D.
The independent variables are uncorrelated
Solution
Homoscedasticity refers to the assumption that the residuals (errors) of a regression model have constant variance across all levels of the independent variable.
Correct Answer:
A
— The residuals have constant variance across all levels of the independent variable