Hot questions in Programming and DS

44 votes
5 answers
121
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
2 votes
4 answers
125
The post-order traversal of binary tree is $\text{ACEDBHIGF}$. The pre-order traversal is$\text{A B C D E F G H I}$$\text{F B A D C E G I H}$$\text{F A B C D E G H I}$$\t...
32 votes
5 answers
126
Assume that the operators $+, -, \times$ are left associative and $^\hat{}$ is right associative. The order of precedence (from highest to lowest) is $ \ ^\hat{}, \times,...
14 votes
3 answers
130
Which one of the following sequences when stored in an array at locations $A , \ldots, A[10]$ forms a max-heap?$23,17,10,6,13,14,1,5,7,12$$23,17,14,7,13,10,1,5,6,12$$23,1...
38 votes
7 answers
132
Let $T$ be a tree with $10$ vertices. The sum of the degrees of all the vertices in $T$ is ________
26 votes
3 answers
138
2 votes
2 answers
139
​​Consider the following $\mathrm{C}$ function definition.int f (int x, int y){ for (int i=0 ; i<y ; i++ ) { x= x + x + y; } return x; }Which of the following stateme...