Most answered questions in Programming and DS

90 votes
11 answers
21
29 votes
11 answers
22
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...
33 votes
10 answers
24
73 votes
10 answers
25
79 votes
10 answers
27
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)$$\...
36 votes
9 answers
28
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...
7 votes
9 answers
31
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...
7 votes
9 answers
34
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
9 votes
9 answers
36
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$$30$$60$$90$$120$
44 votes
9 answers
37
Compute the post fix equivalent of the following expression $3^*\log(x+1)-\frac{a}{2}$
65 votes
9 answers
39
48 votes
9 answers
40
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...