Most answered questions in Programming and DS

25.1k
views
11 answers
90 votes
14.9k
views
11 answers
29 votes
A complete $n$-ary tree is one in which every node has $0$ or $n$ sons. If $x$ is the number of internal nodes of a complete $n$-ary tree, the number of leaves in it is g...
27.8k
views
10 answers
73 votes
32.9k
views
10 answers
80 votes
In a min-heap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time$\Theta (n \log n)$$\Theta (n)$$\Theta(\log n)$$\...
27.0k
views
9 answers
36 votes
What is the worst case time complexity of inserting $n$ elements into an empty linked list, if the linked list needs to be maintained in sorted order?$\Theta(n)$$\Theta(n...
9.3k
views
9 answers
7 votes
The number of different orders are possible for elements 1, 2, 3, 4, 5, 6, 7 to be inserted in to empty AVL tree such that no rotation will be done and element ‘4’ is...
8.3k
views
9 answers
7 votes
What is the output of the following C program? #include<stdio.h #define SQR(x) (x*x) int main() { int a; int b=4; a=SQR(b+2); printf("%d\n",a); return 0; }14361820
15.1k
views
9 answers
9 votes
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$$30$$60$$90$$120$
16.1k
views
9 answers
44 votes
Compute the post fix equivalent of the following expression $3^*\log(x+1)-\frac{a}{2}$
25.2k
views
9 answers
65 votes
32.4k
views
9 answers
48 votes
We are given a set of $n$ distinct elements and an unlabeled binary tree with $n$ nodes. In how many ways can we populate the tree with the given set so that it becomes a...