Computer Science & IT

Download Q&A
Q. How many usable IP addresses are available in a subnet with a /29 subnet mask?
  • A. 2
  • B. 6
  • C. 8
  • D. 4
Q. If a binary search algorithm is implemented recursively, what is its space complexity due to recursion?
  • A. O(1)
  • B. O(log n)
  • C. O(n)
  • D. O(n log n)
Q. If a binary search algorithm is implemented recursively, what is the space complexity due to recursion?
  • A. O(n)
  • B. O(log n)
  • C. O(1)
  • D. O(n log n)
Q. If a binary search algorithm is implemented recursively, what is the space complexity?
  • A. O(1)
  • B. O(log n)
  • C. O(n)
  • D. O(n log n)
Q. If a binary search algorithm returns -1, what does it indicate?
  • A. The element is found
  • B. The element is not in the array
  • C. The array is empty
  • D. The array is sorted
Q. If a binary search is performed on a sorted array of size n, what is the space complexity?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. If a binary search is performed on an array of 32 elements, how many iterations will it take in the worst case?
  • A. 4
  • B. 5
  • C. 6
  • D. 7
Q. If a binary search is performed on an array of size 16, how many comparisons are needed in the worst case?
  • A. 4
  • B. 5
  • C. 6
  • D. 7
Q. If a binary search is performed on an array of size 16, how many comparisons will be made in the worst case?
  • A. 4
  • B. 8
  • C. 16
  • D. 5
Q. If a binary search is performed on an array of size 16, how many comparisons will it take in the worst case?
  • A. 4
  • B. 8
  • C. 16
  • D. 5
Q. If a binary tree has 'n' nodes, what is the maximum height of the tree?
  • A. n
  • B. log n
  • C. n/2
  • D. n-1
Q. If a binary tree has 15 nodes, what is the maximum height of the tree?
  • A. 15
  • B. 4
  • C. 3
  • D. 5
Q. If a binary tree has a height of 'h', what is the minimum number of nodes it can have?
  • A. h
  • B. h + 1
  • C. 2^h - 1
  • D. 2^h
Q. If a binary tree has a height of h, what is the maximum number of nodes it can have?
  • A. 2^h - 1
  • B. 2^h
  • C. h^2
  • D. h!
Q. If a binary tree has n nodes, what is the maximum number of leaf nodes it can have?
  • A. n
  • B. n/2
  • C. n/3
  • D. n/2 + 1
Q. If a binary tree is balanced, what is the maximum height of the tree in terms of the number of nodes 'n'?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. If a dataset has 200 points and you apply K-means clustering with K=4, how many points will be assigned to each cluster on average?
  • A. 50
  • B. 40
  • C. 60
  • D. 30
Q. If a device has an IP address of 172.16.5.10 with a subnet mask of 255.255.255.0, what is its network address?
  • A. 172.16.5.0
  • B. 172.16.5.10
  • C. 172.16.0.0
  • D. 172.16.5.255
Q. If a graph has 5 vertices and 10 edges, what is the maximum number of edges it can have?
  • A. 5
  • B. 10
  • C. 20
  • D. 25
Q. If a graph has 5 vertices and 10 edges, what is the maximum number of iterations Dijkstra's algorithm will perform?
  • A. 5
  • B. 10
  • C. 15
  • D. 20
Q. If a graph has 5 vertices and 10 edges, what is the maximum time complexity of Dijkstra's algorithm using an adjacency matrix?
  • A. O(10)
  • B. O(5^2)
  • C. O(5 log 5)
  • D. O(10 + 5^2)
Q. If a graph has 5 vertices and 7 edges, what is the maximum number of edges in a complete graph with 5 vertices?
  • A. 10
  • B. 12
  • C. 15
  • D. 20
Q. If a graph has 5 vertices and 7 edges, what is the maximum number of edges in a simple undirected graph?
  • A. 10
  • B. 12
  • C. 15
  • D. 20
Q. If a graph has 5 vertices and 7 edges, what is the maximum number of edges it can have?
  • A. 10
  • B. 15
  • C. 20
  • D. 25
Q. If a graph has 5 vertices and 7 edges, what is the maximum number of iterations Dijkstra's algorithm will perform?
  • A. 5
  • B. 7
  • C. 10
  • D. 12
Q. If a graph has a cycle, which traversal method can detect it?
  • A. Only BFS
  • B. Only DFS
  • C. Both BFS and DFS
  • D. Neither BFS nor DFS
Q. If a graph has negative edge weights, which algorithm can be used instead of Dijkstra's algorithm?
  • A. Prim's Algorithm
  • B. Kruskal's Algorithm
  • C. Bellman-Ford Algorithm
  • D. Floyd-Warshall Algorithm
Q. If a graph has negative weight edges, which algorithm can be used instead of Dijkstra's?
  • A. Prim's algorithm
  • B. Kruskal's algorithm
  • C. Bellman-Ford algorithm
  • D. A* algorithm
Q. If a graph has negative weight edges, which algorithm should be used instead of Dijkstra's algorithm?
  • A. Prim's algorithm
  • B. Kruskal's algorithm
  • C. Bellman-Ford algorithm
  • D. Floyd-Warshall algorithm
Q. If a graph has negative weight edges, which algorithm should be used instead of Dijkstra's?
  • A. Prim's algorithm
  • B. Kruskal's algorithm
  • C. Bellman-Ford algorithm
  • D. A* algorithm
Showing 91 to 120 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