Computer Science & IT

Download Q&A
Q. Which of the following is true about the balancing of AVL trees?
  • A. They require rotations to maintain balance after insertions and deletions.
  • B. They do not require any balancing.
  • C. They can only be balanced by deleting nodes.
  • D. They are always balanced after every insertion.
Q. Which of the following is true about the height of a binary tree with n nodes?
  • A. Height = n
  • B. Height = log n
  • C. Height <= n
  • D. Height = n/2
Q. Which of the following is true about the height of a binary tree?
  • A. Height is the number of nodes in the longest path from root to leaf
  • B. Height is the number of edges in the longest path from root to leaf
  • C. Height is always equal to the number of levels in the tree
  • D. Height can be negative
Q. Which of the following is true about the height of a Red-Black tree?
  • A. It can be at most twice the height of an AVL tree.
  • B. It is always equal to the height of a binary search tree.
  • C. It is always less than or equal to log(n).
  • D. It can be greater than the height of an AVL tree.
Q. Which of the following is true about the inorder traversal of a binary search tree?
  • A. It visits nodes in random order.
  • B. It visits nodes in descending order.
  • C. It visits nodes in ascending order.
  • D. It visits only the leaf nodes.
Q. Which of the following is true about the level-order traversal of a binary tree?
  • A. It is depth-first
  • B. It uses a stack
  • C. It visits nodes level by level
  • D. It is faster than in-order traversal
Q. Which of the following is true about the performance of AVL trees?
  • A. Faster than Red-Black Trees for all operations
  • B. Slower than Red-Black Trees for all operations
  • C. Faster for search operations but slower for insertions
  • D. Slower for search operations but faster for insertions
Q. Which of the following methods can be used to determine the optimal number of clusters in K-means?
  • A. Elbow method
  • B. Silhouette analysis
  • C. Gap statistic
  • D. All of the above
Q. Which of the following methods can be used to evaluate the quality of clusters formed by K-means?
  • A. Silhouette score
  • B. Davies-Bouldin index
  • C. Both A and B
  • D. None of the above
Q. Which of the following metrics is commonly used to evaluate the performance of a linear regression model?
  • A. Accuracy
  • B. F1 Score
  • C. Mean Squared Error (MSE)
  • D. Confusion Matrix
Q. Which of the following metrics is commonly used to evaluate the performance of a Decision Tree?
  • A. Mean Squared Error
  • B. Accuracy
  • C. Silhouette Score
  • D. F1 Score
Q. Which of the following metrics is NOT typically used to evaluate clustering performance?
  • A. Silhouette score
  • B. Adjusted Rand Index
  • C. Mean Squared Error
  • D. Davies-Bouldin Index
Q. Which of the following modifications can be made to binary search to find the first occurrence of a target value?
  • A. Change the comparison operator
  • B. Use a different data structure
  • C. Modify the mid-point calculation
  • D. Continue searching left after finding the target
Q. Which of the following operations can be performed in constant time on a queue?
  • A. Enqueue
  • B. Dequeue
  • C. Peek
  • D. All of the above
Q. Which of the following operations can be performed in constant time on an array?
  • A. Insertion at end
  • B. Deletion from beginning
  • C. Accessing an element
  • D. Insertion at beginning
Q. Which of the following operations can be performed in O(1) time on a linked list?
  • A. Insertion at the end
  • B. Deletion from the beginning
  • C. Searching for an element
  • D. Traversal
Q. Which of the following operations can be performed in O(1) time on a stack?
  • A. Push
  • B. Pop
  • C. Peek
  • D. All of the above
Q. Which of the following operations can cause a violation of the AVL tree property?
  • A. Insertion of a node.
  • B. Deletion of a node.
  • C. Both insertion and deletion.
  • D. Traversal of the tree.
Q. Which of the following operations can cause an imbalance in an AVL tree?
  • A. Insertion
  • B. Deletion
  • C. Both Insertion and Deletion
  • D. Traversal
Q. Which of the following operations has a time complexity of O(1) in a stack?
  • A. Push
  • B. Pop
  • C. Peek
  • D. All of the above
Q. Which of the following operations has a time complexity of O(n) in a linked list?
  • A. Accessing an element
  • B. Inserting at the end
  • C. Deleting a node
  • D. Searching for a value
Q. Which of the following operations has a time complexity of O(n) in a singly linked list?
  • A. Insertion at head
  • B. Insertion at tail
  • C. Deletion at head
  • D. Accessing an element by index
Q. Which of the following operations has a time complexity of O(n) in a stack?
  • A. Push
  • B. Pop
  • C. Peek
  • D. None of the above
Q. Which of the following operations has the worst time complexity in a singly linked list?
  • A. Accessing an element
  • B. Inserting an element
  • C. Deleting an element
  • D. Traversing the list
Q. Which of the following operations is guaranteed to be O(log n) in an AVL tree?
  • A. Insertion
  • B. Deletion
  • C. Searching
  • D. All of the above
Q. Which of the following operations is guaranteed to be O(log n) in both AVL and Red-Black trees?
  • A. Insertion
  • B. Deletion
  • C. Searching
  • D. All of the above
Q. Which of the following operations is more efficient in a Red-Black tree compared to an AVL tree?
  • A. Insertion
  • B. Deletion
  • C. Searching
  • D. All of the above
Q. Which of the following operations is more efficient in an AVL tree compared to a Red-Black tree?
  • A. Insertion
  • B. Deletion
  • C. Searching
  • D. All of the above
Q. Which of the following operations is more efficient in AVL trees compared to Red-Black trees?
  • A. Search
  • B. Insertion
  • C. Deletion
  • D. Traversal
Q. Which of the following operations is not allowed in a Red-Black tree?
  • A. Insertion
  • B. Deletion
  • C. Searching
  • D. Creating a node with two red children
Showing 2881 to 2910 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