Computer Science & IT

Download Q&A
Q. In which scenario is binary search NOT applicable?
  • A. Finding an element in a sorted array
  • B. Finding the square root of a number
  • C. Finding an element in an unsorted array
  • D. Finding the maximum element in a sorted array
Q. In which scenario is Breadth-First Search (BFS) preferred over Depth-First Search (DFS)?
  • A. When memory is limited
  • B. When the shortest path is required
  • C. When the graph is very deep
  • D. When cycles are present
Q. In which scenario is DFS preferred over BFS?
  • A. Finding the shortest path
  • B. Exploring all possible paths
  • C. Finding connected components
  • D. Finding the minimum spanning tree
Q. In which scenario is Dijkstra's algorithm most effective?
  • A. When all edge weights are negative
  • B. When edge weights are non-negative
  • C. When the graph is unweighted
  • D. When the graph is a tree
Q. In which scenario is Dijkstra's algorithm most effectively applied?
  • A. Finding the shortest path in an unweighted graph
  • B. Finding the shortest path in a weighted graph with non-negative weights
  • C. Finding the longest path in a graph
  • D. Finding a cycle in a graph
Q. In which scenario is Dijkstra's algorithm most efficient?
  • A. When all edge weights are equal
  • B. When the graph is sparse
  • C. When the graph is dense
  • D. When there are many negative weights
Q. In which scenario is Dijkstra's algorithm NOT applicable?
  • A. When all edge weights are non-negative
  • B. When there are negative edge weights
  • C. When the graph is directed
  • D. When the graph is undirected
Q. In which scenario is Dijkstra's algorithm not suitable?
  • A. Finding the shortest path in a road network
  • B. Finding the shortest path in a graph with negative weights
  • C. Finding the shortest path in a weighted graph
  • D. Finding the shortest path in a tree
Q. In which scenario is Heap Sort particularly useful?
  • A. When memory usage is a concern
  • B. When the data is already sorted
  • C. When the data is small
  • D. When stability is required
Q. In which scenario is Quick Sort generally faster than Merge Sort?
  • A. When the array is small
  • B. When the array is large
  • C. When the array is nearly sorted
  • D. When the array is reverse sorted
Q. In which scenario is Quick Sort generally preferred over Merge Sort?
  • A. When memory usage is a concern
  • B. When the data is nearly sorted
  • C. When stability is required
  • D. When the data is small
Q. In which scenario is Quick Sort likely to perform poorly?
  • A. When the array is already sorted
  • B. When the array is in reverse order
  • C. When the array has many duplicate elements
  • D. When the array is small
Q. In which scenario is Quick Sort preferred over Merge Sort?
  • A. When memory usage is a concern
  • B. When stability is required
  • C. When the data is nearly sorted
  • D. When the data is large and random
Q. In which scenario is the F1 Score particularly useful?
  • A. When false positives are more critical than false negatives
  • B. When false negatives are more critical than false positives
  • C. When the class distribution is balanced
  • D. When the class distribution is imbalanced
Q. In which scenario would a circular queue be preferred over a regular queue?
  • A. When memory is limited
  • B. When elements need to be sorted
  • C. When implementing a stack
  • D. When processing data in a LIFO manner
Q. In which scenario would a linked list be preferred over an array?
  • A. When the size of the data is known
  • B. When frequent insertions and deletions are required
  • C. When random access is needed
  • D. When memory is limited
Q. In which scenario would a queue be more appropriate than a stack?
  • A. When you need to access the last element added
  • B. When you need to process elements in the order they were added
  • C. When you need to sort elements
  • D. When you need to implement recursion
Q. In which scenario would a queue be the most appropriate data structure to use?
  • A. Reversing a string
  • B. Processing tasks in a printer
  • C. Evaluating expressions
  • D. Implementing a backtracking algorithm
Q. In which scenario would a queue be used in a web server?
  • A. To manage user sessions
  • B. To handle incoming requests
  • C. To store user data
  • D. To cache web pages
Q. In which scenario would a Random Forest be preferred over a single Decision Tree?
  • A. When interpretability is the main goal
  • B. When the dataset is small
  • C. When overfitting is a concern
  • D. When the model needs to run in real-time
Q. In which scenario would a Red-Black tree be preferred over an AVL tree?
  • A. When frequent insertions and deletions are expected.
  • B. When memory usage is a critical factor.
  • C. When the dataset is static and does not change.
  • D. When the tree needs to be perfectly balanced.
Q. In which scenario would a stack be more beneficial than a queue?
  • A. When processing tasks in order of arrival
  • B. When reversing a string
  • C. When managing print jobs
  • D. When implementing breadth-first search
Q. In which scenario would a stack be preferred over a queue?
  • A. When processing tasks in a last-in, first-out manner
  • B. When tasks need to be processed in the order they arrive
  • C. When implementing breadth-first search
  • D. When managing a list of items to be displayed
Q. In which scenario would an AVL tree be preferred over a Red-Black tree?
  • A. When insertions and deletions are more frequent than searches.
  • B. When search operations are more frequent than insertions and deletions.
  • C. When memory usage is a concern.
  • D. When the dataset is small.
Q. In which scenario would BFS be preferred over DFS?
  • A. Finding the shortest path in an unweighted graph
  • B. Finding a path in a maze
  • C. Topological sorting
  • D. Finding connected components
Q. In which scenario would binary search be preferred over linear search?
  • A. When the array is small
  • B. When the array is unsorted
  • C. When the array is large and sorted
  • D. When searching for multiple elements
Q. In which scenario would binary search not be applicable?
  • A. Searching in a sorted array
  • B. Searching in a linked list
  • C. Searching in a sorted linked list
  • D. Searching in a sorted array with duplicates
Q. In which scenario would clustering be most beneficial?
  • A. Identifying customer groups in a retail dataset
  • B. Predicting future sales
  • C. Classifying emails as spam or not spam
  • D. Forecasting weather patterns
Q. In which scenario would clustering be most useful?
  • A. Identifying customer groups in a dataset
  • B. Predicting future sales
  • C. Classifying emails as spam or not
  • D. Forecasting weather patterns
Q. In which scenario would Depth-First Search (DFS) be preferred over Breadth-First Search (BFS)?
  • A. Finding the shortest path
  • B. Exploring all nodes in a level
  • C. When memory is limited
  • D. Finding connected components
Showing 601 to 630 of 3237 (108 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely