Computer Science & IT

Download Q&A
Q. If you have a sorted array of 1000 elements, how many iterations will binary search take to find an element?
  • A. 10
  • B. 9
  • C. 8
  • D. 7
Q. If you have a sorted array of 1000 elements, how many iterations will binary search take at most?
  • A. 10
  • B. 20
  • C. 30
  • D. 40
Q. In a /16 subnet, what is the range of valid host addresses for the network 172.16.0.0?
  • A. 172.16.0.1 to 172.16.255.254
  • B. 172.16.0.0 to 172.16.255.255
  • C. 172.16.0.0 to 172.16.0.255
  • D. 172.16.1.0 to 172.16.1.255
Q. In a binary classification problem using SVM, what does a decision boundary represent?
  • A. The line that separates the two classes
  • B. The average of all data points
  • C. The centroid of the data points
  • D. The area of overlap between classes
Q. In a binary classification problem, what does a confusion matrix represent?
  • A. The relationship between features
  • B. The performance of the model on training data
  • C. The true positive, false positive, true negative, and false negative counts
  • D. The distribution of the target variable
Q. In a binary classification problem, what does a high precision indicate?
  • A. High true positive rate
  • B. Low false positive rate
  • C. High true negative rate
  • D. Low false negative rate
Q. In a binary classification problem, what does a high recall indicate?
  • A. High true positive rate
  • B. High false positive rate
  • C. Low true negative rate
  • D. Low false negative rate
Q. In a binary classification problem, what does a high value of the margin indicate?
  • A. The model is likely to overfit
  • B. The model has a high bias
  • C. The model is more robust to noise
  • D. The model is underfitting
Q. In a binary classification, what does a high recall indicate?
  • A. The model is good at identifying negative cases
  • B. The model is good at identifying positive cases
  • C. The model has a high number of false positives
  • D. The model has a high number of false negatives
Q. In a binary search algorithm, if the middle element is greater than the target, what should be done next?
  • A. Search the left half
  • B. Search the right half
  • C. Return the middle element
  • D. Increase the middle index
Q. In a binary search algorithm, if the target is less than the mid element, what should be the next step?
  • A. Search the right half
  • B. Search the left half
  • C. Return the mid index
  • D. Increase the mid index
Q. In a binary search algorithm, if the target is less than the mid value, what should be the next step?
  • A. Search the left half of the array
  • B. Search the right half of the array
  • C. Return the mid index
  • D. Increase the mid index
Q. In a binary search algorithm, what happens if the middle element is equal to the target?
  • A. Search continues in the left half
  • B. Search continues in the right half
  • C. Target is found
  • D. Search terminates immediately
Q. In a binary search algorithm, what happens if the middle element is less than the target?
  • A. Search the left half
  • B. Search the right half
  • C. Return the middle element
  • D. Terminate the search
Q. In a binary search algorithm, what happens if the target is less than the mid value?
  • A. Search the right half
  • B. Search the left half
  • C. Return the mid index
  • D. Increase the mid index
Q. In a binary search algorithm, what happens if the target is less than the middle element?
  • A. Search the right half
  • B. Search the left half
  • C. Return the middle element
  • D. End the search
Q. In a binary search algorithm, what happens to the search space after each comparison?
  • A. It doubles
  • B. It remains the same
  • C. It halves
  • D. It increases linearly
Q. In a binary search implementation, if the target is less than the mid value, what should be the next step?
  • A. Search the right half
  • B. Search the left half
  • C. Return the mid index
  • D. Increase the mid index
Q. In a binary search implementation, what condition is checked to determine if the search should continue?
  • A. If the target is less than the middle element
  • B. If the target is greater than the middle element
  • C. If the target is equal to the middle element
  • D. All of the above
Q. In a binary search implementation, what happens if the target is less than the mid value?
  • A. Search the right half
  • B. Search the left half
  • C. Return mid
  • D. End the search
Q. In a binary search implementation, what is the condition to continue searching?
  • A. left <= right
  • B. left < right
  • C. left < mid
  • D. mid < right
Q. In a binary search implementation, what is the purpose of the 'mid' variable?
  • A. To store the maximum value
  • B. To find the middle index
  • C. To count iterations
  • D. To store the minimum value
Q. In a binary search implementation, what is the role of the 'low' and 'high' variables?
  • A. To store the size of the array
  • B. To track the current search range
  • C. To count the number of iterations
  • D. To store the target value
Q. In a binary search tree (BST), how does binary search differ from searching in a sorted array?
  • A. It is slower
  • B. It requires more comparisons
  • C. It can be done in O(1)
  • D. It uses tree properties
Q. In a binary search tree, how does binary search help in finding an element?
  • A. By traversing all nodes
  • B. By comparing with the root and deciding left or right
  • C. By using a queue
  • D. By using a stack
Q. In a binary search tree, what is the average time complexity for searching an element?
  • A. O(1)
  • B. O(log n)
  • C. O(n)
  • D. O(n log n)
Q. In a binary search tree, what is the maximum number of nodes at depth 'd'?
  • A. 2^d
  • B. 2^(d+1) - 1
  • C. d^2
  • D. d!
Q. In a binary search tree, what is the time complexity for inserting an element in the average case?
  • A. O(1)
  • B. O(log n)
  • C. O(n)
  • D. O(n log n)
Q. In a binary search tree, what is the time complexity for searching for an element in the average case?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. In a binary search tree, what is the time complexity of searching for an element in the average case?
  • A. O(1)
  • B. O(log n)
  • C. O(n)
  • D. O(n log n)
Showing 151 to 180 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