Computer Science & IT

Download Q&A
Q. Which of the following is a valid application of binary search?
  • A. Finding the square root of a number
  • B. Finding an element in a sorted array
  • C. Sorting an array
  • D. Searching in a hash table
Q. Which of the following is a valid application of Dijkstra's algorithm?
  • A. Finding the minimum spanning tree
  • B. Finding the shortest path in a road network
  • C. Finding strongly connected components
  • D. Sorting a list of numbers
Q. Which of the following is a valid HTTP status code for a successful request?
  • A. 200
  • B. 301
  • C. 403
  • D. 500
Q. Which of the following is a valid implementation detail of Dijkstra's algorithm?
  • A. Using a depth-first search approach
  • B. Updating the distance of adjacent nodes only if they are visited
  • C. Using a priority queue to select the next node
  • D. Storing all nodes in a single array
Q. Which of the following is a valid implementation of binary search in Python?
  • A. def binary_search(arr, target): ...
  • B. def binary_search(arr, target): for i in arr: if i == target: return i
  • C. def binary_search(arr, target): while arr: ...
  • D. def binary_search(arr, target): return arr.index(target)
Q. Which of the following is a valid IPv4 address?
  • A. 192.168.1.256
  • B. 172.16.0.1
  • C. 10.0.0.999
  • D. 255.255.255.256
Q. Which of the following is a valid operation for a queue?
  • A. Push
  • B. Pop
  • C. Enqueue
  • D. Dequeue
Q. Which of the following is a valid operation for a stack?
  • A. Enqueue
  • B. Dequeue
  • C. Push
  • D. Insert
Q. Which of the following is a valid property of AVL trees?
  • A. The height difference between left and right subtrees can be at most 2.
  • B. Every node must be black.
  • C. The height difference between left and right subtrees can be at most 1.
  • D. All leaves are red.
Q. Which of the following is a valid property of Red-Black trees?
  • A. The height of the tree is always even
  • B. No two red nodes can be adjacent
  • C. All nodes must have two children
  • D. The root can be red
Q. Which of the following is a valid sequence of colors for a Red-Black tree?
  • A. Red, Red, Black
  • B. Black, Red, Black
  • C. Red, Black, Red
  • D. Black, Black, Red
Q. Which of the following is a valid subnet mask for a Class C IP address?
  • A. 255.255.255.0
  • B. 255.255.0.0
  • C. 255.0.0.0
  • D. 255.255.255.255
Q. Which of the following is a valid use case for a stack?
  • A. Undo functionality in applications
  • B. Managing print jobs
  • C. Handling requests in a web server
  • D. All of the above
Q. Which of the following is a valid variable declaration in C?
  • A. int 1number;
  • B. float number1;
  • C. char number#;
  • D. double number@;
Q. Which of the following is a valid way to append an element to a linked list in Python?
  • A. list.append(value)
  • B. linked_list.add(value)
  • C. linked_list.append(value)
  • D. list.add(value)
Q. Which of the following is a valid way to implement a binary tree in C++?
  • A. Using an array
  • B. Using a linked list
  • C. Using a struct
  • D. All of the above
Q. Which of the following is a valid way to implement a binary tree in Python?
  • A. Using a list
  • B. Using a dictionary
  • C. Using a class
  • D. All of the above
Q. Which of the following is a valid way to implement a binary tree node in C++?
  • A. struct Node { int data; Node* left; Node* right; };
  • B. class Node { int data; Node left; Node right; };
  • C. struct Node { int data; Node left; Node right; };
  • D. class Node { public: int data; Node* left; Node* right; };
Q. Which of the following is a valid way to implement a binary tree node in Python?
  • A. class Node: def __init__(self, value): self.value = value
  • B. class Node: def __init__(self, value): self.value = value; self.left = None; self.right = None
  • C. class Node: def __init__(self): self.value = None
  • D. class Node: def __init__(self, value): self.left = None; self.right = None
Q. Which of the following is a valid way to represent a binary tree node in C++?
  • A. struct Node { int data; Node* left; Node* right; };
  • B. class Node { int data; Node* left; Node* right; };
  • C. struct Node { int data; Node left; Node right; };
  • D. class Node { int data; Node left; Node right; };
Q. Which of the following is an advantage of using intermediate code?
  • A. It simplifies the parsing process
  • B. It allows for easier debugging
  • C. It enables machine-independent optimizations
  • D. It eliminates the need for a front-end
Q. Which of the following is an application of a queue?
  • A. Undo functionality in text editors
  • B. Breadth-first search in graphs
  • C. Expression evaluation
  • D. Memory management
Q. Which of the following is an application of clustering in real-world scenarios?
  • A. Spam detection in emails
  • B. Customer segmentation in marketing
  • C. Predicting stock prices
  • D. Image classification
Q. Which of the following is an application of Dijkstra's algorithm?
  • A. Finding the shortest route in GPS navigation
  • B. Sorting a list of numbers
  • C. Searching for an element in a binary search tree
  • D. Calculating the factorial of a number
Q. Which of the following is an application of queues?
  • A. Undo functionality in text editors
  • B. Breadth-first search in graphs
  • C. Expression evaluation
  • D. Memory management
Q. Which of the following is an example of a classification algorithm?
  • A. Linear Regression
  • B. Logistic Regression
  • C. K-Means Clustering
  • D. Principal Component Analysis
Q. Which of the following is an example of a cloud service?
  • A. Google Drive
  • B. Microsoft Word
  • C. Adobe Photoshop
  • D. Notepad
Q. Which of the following is an example of a problem that can be solved using divide and conquer?
  • A. Binary search
  • B. Fibonacci sequence
  • C. Linear search
  • D. Bubble sort
Q. Which of the following is an example of a problem that can be solved using dynamic programming?
  • A. Finding the maximum sum of a contiguous subarray
  • B. Finding the maximum element in an array
  • C. Sorting an array of integers
  • D. Searching for an element in an unsorted array
Q. Which of the following is an example of a regression algorithm?
  • A. K-Means
  • B. Logistic Regression
  • C. Random Forest
  • D. Support Vector Classifier
Showing 2701 to 2730 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