Q. What is the primary use of a stack in algorithm design?
A.
To store data in a sorted manner
B.
To manage function calls
C.
To implement breadth-first search
D.
To maintain a queue of tasks
Show solution
Solution
Stacks are primarily used to manage function calls in programming, allowing for backtracking and maintaining the order of execution.
Correct Answer:
B
— To manage function calls
Learn More →
Q. What is the primary use of a stack in numerical applications?
A.
To store data in a sorted manner
B.
To reverse a sequence of numbers
C.
To perform breadth-first search
D.
To implement a priority queue
Show solution
Solution
Stacks are used to reverse sequences because they follow Last In First Out (LIFO) principle.
Correct Answer:
B
— To reverse a sequence of numbers
Learn More →
Q. What is the primary use of a stack in programming?
A.
Storing data in a sorted manner
B.
Managing function calls
C.
Implementing queues
D.
Searching data
Show solution
Solution
Stacks are primarily used to manage function calls in programming, following the Last In First Out (LIFO) principle.
Correct Answer:
B
— Managing function calls
Learn More →
Q. What is the primary use of AVL trees in competitive programming?
A.
To store large datasets with minimal memory
B.
To maintain a sorted list of elements with fast access
C.
To implement priority queues
D.
To perform graph traversal
Show solution
Solution
AVL trees are primarily used in competitive programming to maintain a sorted list of elements with fast access, ensuring efficient operations.
Correct Answer:
B
— To maintain a sorted list of elements with fast access
Learn More →
Q. What is the primary use of Breadth-First Search (BFS) in graph traversal?
A.
Finding the shortest path in an unweighted graph
B.
Finding connected components in a graph
C.
Sorting the nodes of a graph
D.
Detecting cycles in a graph
Show solution
Solution
BFS is primarily used for finding the shortest path in an unweighted graph because it explores all neighbors at the present depth prior to moving on to nodes at the next depth level.
Correct Answer:
A
— Finding the shortest path in an unweighted graph
Learn More →
Q. What is the primary use of dynamic programming in algorithm design?
A.
To solve problems with overlapping subproblems and optimal substructure
B.
To sort large datasets efficiently
C.
To traverse trees and graphs
D.
To implement data structures like stacks and queues
Show solution
Solution
Dynamic programming is primarily used to solve problems that can be broken down into overlapping subproblems and have optimal substructure, allowing for efficient computation.
Correct Answer:
A
— To solve problems with overlapping subproblems and optimal substructure
Learn More →
Q. What is the primary use of dynamic programming in competitive programming?
A.
To solve problems with unique solutions
B.
To optimize problems with overlapping subproblems
C.
To sort data efficiently
D.
To traverse graphs
Show solution
Solution
Dynamic programming is primarily used in competitive programming to optimize problems that have overlapping subproblems.
Correct Answer:
B
— To optimize problems with overlapping subproblems
Learn More →
Q. What is the primary use of dynamic programming in real-world applications?
A.
Sorting data
B.
Finding shortest paths
C.
Searching in databases
D.
Data compression
Show solution
Solution
Dynamic programming is primarily used for optimization problems, such as finding the shortest paths in graphs.
Correct Answer:
B
— Finding shortest paths
Learn More →
Q. What is the primary use of Red-Black trees in computer science?
A.
Implementing priority queues
B.
Maintaining sorted data with fast insertions and deletions
C.
Storing data in a linear fashion
D.
Creating hash tables
Show solution
Solution
Red-Black trees are primarily used for maintaining sorted data with fast insertions and deletions, making them suitable for associative arrays.
Correct Answer:
B
— Maintaining sorted data with fast insertions and deletions
Learn More →
Q. What is the primary use of the 'dp' array in dynamic programming?
A.
To store input values
B.
To keep track of visited nodes
C.
To store solutions to subproblems
D.
To sort elements
Show solution
Solution
The 'dp' array is used to store solutions to subproblems in dynamic programming.
Correct Answer:
C
— To store solutions to subproblems
Learn More →
Q. What is the purpose of a confusion matrix in classification tasks?
A.
To visualize the training process
B.
To summarize the performance of a classification algorithm
C.
To reduce overfitting
D.
To optimize hyperparameters
Show solution
Solution
A confusion matrix summarizes the performance of a classification algorithm by showing true vs. predicted classifications.
Correct Answer:
B
— To summarize the performance of a classification algorithm
Learn More →
Q. What is the purpose of a confusion matrix?
A.
To visualize the performance of a regression model
B.
To summarize the performance of a classification model
C.
To optimize hyperparameters
D.
To reduce overfitting
Show solution
Solution
A confusion matrix summarizes the performance of a classification model by showing true vs. predicted classifications.
Correct Answer:
B
— To summarize the performance of a classification model
Learn More →
Q. What is the purpose of a finite automaton in lexical analysis?
A.
To parse the syntax of the code
B.
To recognize patterns in the input stream
C.
To generate machine code
D.
To optimize the code
Show solution
Solution
A finite automaton is used to recognize patterns in the input stream, which helps in identifying tokens.
Correct Answer:
B
— To recognize patterns in the input stream
Learn More →
Q. What is the purpose of a firewall in computer networks?
A.
To speed up internet connection
B.
To protect against unauthorized access
C.
To store data
D.
To manage network traffic
Show solution
Solution
The purpose of a firewall is to protect against unauthorized access.
Correct Answer:
B
— To protect against unauthorized access
Learn More →
Q. What is the purpose of a firewall in network security?
A.
To encrypt data
B.
To block unauthorized access
C.
To speed up internet connection
D.
To store data
Show solution
Solution
The purpose of a firewall in network security is to block unauthorized access.
Correct Answer:
B
— To block unauthorized access
Learn More →
Q. What is the purpose of a loss function in supervised learning?
A.
To measure the performance of the model
B.
To optimize the model parameters
C.
To define the model architecture
D.
To preprocess the input data
Show solution
Solution
The loss function measures the performance of the model by quantifying the difference between predicted and actual values.
Correct Answer:
A
— To measure the performance of the model
Learn More →
Q. What is the purpose of a model monitoring system post-deployment?
A.
To retrain the model automatically
B.
To track model performance and detect issues
C.
To optimize hyperparameters
D.
To visualize training data
Show solution
Solution
A model monitoring system tracks performance metrics and detects issues such as data drift or model degradation after deployment.
Correct Answer:
B
— To track model performance and detect issues
Learn More →
Q. What is the purpose of a model serving framework?
A.
To train models faster
B.
To manage and serve models in production
C.
To visualize model performance
D.
To preprocess data
Show solution
Solution
A model serving framework is designed to manage and serve machine learning models in a production environment, facilitating inference.
Correct Answer:
B
— To manage and serve models in production
Learn More →
Q. What is the purpose of a router in a network?
A.
To connect devices within the same local area network
B.
To filter traffic based on MAC addresses
C.
To route traffic between different networks
D.
To provide wireless connectivity
Show solution
Solution
A router routes traffic between different networks, making decisions based on IP addresses.
Correct Answer:
C
— To route traffic between different networks
Learn More →
Q. What is the purpose of a switch in a network?
A.
To connect different networks
B.
To filter traffic based on IP addresses
C.
To connect devices within the same network
D.
To provide internet access
Show solution
Solution
A switch connects devices within the same network and uses MAC addresses to forward data to the correct destination.
Correct Answer:
C
— To connect devices within the same network
Learn More →
Q. What is the purpose of a symbol table in a compiler?
A.
To store intermediate code
B.
To keep track of variable names and types
C.
To optimize the code
D.
To parse the source code
Show solution
Solution
The symbol table is used to keep track of variable names, types, and other attributes during the compilation process.
Correct Answer:
B
— To keep track of variable names and types
Learn More →
Q. What is the purpose of a symbol table in the context of lexical analysis?
A.
To store the tokens generated
B.
To keep track of variable names and their attributes
C.
To optimize the code
D.
To parse the syntax tree
Show solution
Solution
The symbol table is used to keep track of variable names, their types, and other attributes during the compilation process.
Correct Answer:
B
— To keep track of variable names and their attributes
Learn More →
Q. What is the purpose of a VLAN in switching?
A.
To increase bandwidth
B.
To segment network traffic
C.
To provide redundancy
D.
To enhance security
Show solution
Solution
A VLAN (Virtual Local Area Network) is used to segment network traffic, allowing for better management and isolation of different network segments.
Correct Answer:
B
— To segment network traffic
Learn More →
Q. What is the purpose of A/B testing in MLOps?
A.
To compare two versions of a model
B.
To train models faster
C.
To clean data
D.
To visualize model performance
Show solution
Solution
A/B testing is used to compare two versions of a model to determine which one performs better in a real-world scenario.
Correct Answer:
A
— To compare two versions of a model
Learn More →
Q. What is the purpose of A/B testing in model deployment?
A.
To compare two versions of a model
B.
To train models faster
C.
To clean data
D.
To visualize model performance
Show solution
Solution
A/B testing is used to compare two versions of a model to determine which one performs better in a real-world scenario.
Correct Answer:
A
— To compare two versions of a model
Learn More →
Q. What is the purpose of A/B testing in the context of model deployment?
A.
To compare two different models
B.
To evaluate model performance on training data
C.
To tune hyperparameters
D.
To visualize model predictions
Show solution
Solution
A/B testing is used to compare the performance of two different models or versions of a model in a real-world setting.
Correct Answer:
A
— To compare two different models
Learn More →
Q. What is the purpose of batch normalization in neural networks?
A.
To increase the number of training epochs
B.
To normalize the input features
C.
To stabilize and accelerate training
D.
To reduce the size of the model
Show solution
Solution
Batch normalization helps stabilize and accelerate the training process by normalizing the inputs to each layer.
Correct Answer:
C
— To stabilize and accelerate training
Learn More →
Q. What is the purpose of code generation in a compiler?
A.
To analyze the syntax of the source code
B.
To produce machine code from intermediate code
C.
To optimize the source code
D.
To perform lexical analysis
Show solution
Solution
Code generation is the phase where the compiler translates intermediate code into machine code that can be executed by the target machine.
Correct Answer:
B
— To produce machine code from intermediate code
Learn More →
Q. What is the purpose of constant folding in code optimization?
A.
To replace variables with their constant values
B.
To eliminate unnecessary function calls
C.
To simplify control flow
D.
To optimize memory allocation
Show solution
Solution
Constant folding is used to replace variables with their constant values at compile time, reducing runtime calculations.
Correct Answer:
A
— To replace variables with their constant values
Learn More →
Q. What is the purpose of containerization in model deployment?
A.
To improve model accuracy
B.
To ensure consistent environments across deployments
C.
To reduce model size
D.
To enhance data preprocessing
Show solution
Solution
Containerization ensures consistent environments across deployments, reducing compatibility issues.
Correct Answer:
B
— To ensure consistent environments across deployments
Learn More →
Showing 1501 to 1530 of 3237 (108 Pages)