October 1, 2023

Algorithms

Question 1 An array of integers of size n can be converted into a heap by adjusting the heaps rooted at each internal node of the […]
October 3, 2023

GATE 2017 [Set-1]

Question 26 Let G = (V, E) be any connected undirected edge-weighted graph. The weights of the edges in E are positive and distinct. Consider the […]
October 3, 2023

GATE 2017 [Set-2]

Question 3 Match the algorithms with their time complexities: Algorithm                                Time […]
October 3, 2023

Algorithms

Question 1 An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability […]
October 3, 2023

GATE 2023

Question 15 The Lucas sequence Ln is defined by the recurrence relation: Ln = Ln-1 + Ln-2 , for n >= 3, with L1 = 1 […]
October 3, 2023

Nielit Scentist-B [02-12-2018]

Question 1 For the given recurrence equation T(n)=2T(n-1), if n>0. =1, otherwise A O(nlogn) B O(n2) C O(2n) D O(n) AlgorithmsRecurrencesVideo-Explanation Question 1 Explanation:  T(n) = […]
October 3, 2023

GATE 2005

Question 7 The time complexity of computing the transitive closure of a binary relation on a set of n elements is known to be: A O(n) […]
October 3, 2023

Heap-Tree

Question 9 Which one of the following sequences when stored in an array at locations A[1],…,A[10] forms a max-heap? A 23, 17, 10, 6, 13, 14, […]
October 4, 2023

Time-Complexity

Question 14 The cube root of a natural number n is defined as the largest natural number m such that m3≤n. The complexity of computing the […]
October 4, 2023

Minimum-Spanning-Tree

Question 7 What is the weight of a minimum spanning tree of the following graph ? A 29 B 31 C 38 D 41 Algorithms Minimum-Spanning-TreeGATE […]
October 4, 2023

Algorithms

Question 17 How many minimum spanning trees does the following graph have? Draw them. (Weights are assigned to the edge). A Theory Explanation. AlgorithmsMinimum-Spanning-TreeGATE 1995 Correct […]
October 4, 2023

Algorithms

Question 3 Let f(n), g(n) and h(n) be functions defined for positive inter such that f(n) = O(g(n)), g(n) ≠ O(f(n)), g(n) = O(h(n)), and h(n) = […]