top of page
Courses
Blog
Search
Ask & Answer
Forum
Log In
All Posts
Basics of Linux
Algorithms
Past Year Papers
Ask & Answer
DPPs
RCs
Delhi University - Past Year Papers
Search
What is the minimum number of leaves in the decision tree for a comparison sort? Use this observation to derive a lower bound on the number of comparisons performed by a comparison sort in the wors...
Dhruv Badaya
May 26, 2024
1 min read
What is the smallest possible depth of a leaf in a decision tree for a comparison sort? Name a sorting technique to which this smallest depth would correspond.
Dhruv Badaya
May 26, 2024
1 min read
Let G = (V,E) be a directed unweighted graph. Given two vertices s and t in V, what is the time required to determine if there exists at least one s-t path in G? Can we use the DFS algorithm to fin...
Dhruv Badaya
May 26, 2024
1 min read
A student was asked to sort a list of n numbers in decreasing order. The student writes an algorithm that works iteratively as follows. In every iteration, the following two steps are done...
Dhruv Badaya
May 26, 2024
2 min read
For each of the following sorting algorithms, merge sort and insertion sort, discuss whether or not it is (i) stable and (ii) in-place
Dhruv Badaya
May 26, 2024
1 min read
Consider the scheduling problem wherein you are given a single resource and a set of requests having deadlines. A request is said to be late be late if it misses the deadline. Your goal is to minim...
Dhruv Badaya
May 26, 2024
2 min read
Show that in any subtree of a max-heap, the root of the subtree contains the largest value occurring anywhere in that subtree.
Dhruv Badaya
May 26, 2024
1 min read
We are given a weighted graph G in which edge weights are not necessarily distinct. Can graph G have more than one minimum spanning tree (MST)? If yes, give an example, else justify.
Dhruv Badaya
May 26, 2024
1 min read
Why is the worst-case running time for bucket sort θ(n²)? What changes would you make to the algorithm so that its worst-case running time becomes O(nlgn)?
Dhruv Badaya
May 26, 2024
1 min read
Specify whether the above graph is bipartite or not. If yes, give the partition, else justify.
Dhruv Badaya
May 25, 2024
1 min read
Let G be a tree graph. Further, let A and B be the trees produced by performing BFS and DFS respectively on G. Can A and B be different trees? Why or why not?
Dhruv Badaya
May 25, 2024
1 min read
How many topological orderings does the following graph have? Specify all of them.
Dhruv Badaya
May 25, 2024
1 min read
Can dynamic programming be applied to all optimization problems? Why or why not?
Dhruv Badaya
May 25, 2024
1 min read
Will the greedy strategy with the greedy parameter being value per unit weight of the items yield an optimal solution for the 0-1 knapsack problem? Justify.
Dhruv Badaya
May 25, 2024
1 min read
A team of explorers is visiting the Sahara desert. Due to the extreme heat, they need to stay hydrated and have brought n bottles of different sizes to carry water. After travelling a few kilometre...
Dhruv Badaya
May 25, 2024
1 min read
Discuss the running time of the following snippet of code: count=0 for (i=l, i<=n, i++) for (j=1, j<=n, j=2*j) count++
Dhruv Badaya
May 25, 2024
1 min read
Use master's theorem to give tight asymptotic bounds for the recurrence T(n) = 8 T(n/2) + θ(n²).
Dhruv Badaya
May 25, 2024
0 min read
Draw the block diagram of the learning agent and explain its working.
Dhruv Badaya
May 25, 2024
1 min read
What is a Truth Maintenance System (TMS)? Give the architecture of a problem solver with a TMS in the form of a diagram.
Dhruv Badaya
May 25, 2024
2 min read
What is default reasoning?
Dhruv Badaya
May 25, 2024
1 min read
bottom of page