Highest voted questions in Programming and DS

1 votes
1 answer
1964
I have a confusion regarding the array implementation of binary tree ,i.e what are the index locations of the left child of a node whether it is 2i+1 or 2i and same for r...
1 votes
0 answers
1965
1 votes
1 answer
1966
Consider the following binary tree with root at level 0. What is the internal path length for the above tree?31142932
1 votes
0 answers
1968
void find(int x){ static int i=10,y=0; y=y+i; for(i;i>0;i=i-10){ if(x!=0) find(x-1); else{ printf("%d",y); } } }What will be output printed for find(4)?
1 votes
0 answers
1969
1 votes
2 answers
1971
Tell me the difference :&(arr+1) and &arr+1
1 votes
1 answer
1972
#include <stdio.h int main() { int a = 1; char d[] = "ab"; printf("%d", sizeof(a+d)); return 0; }Explain the Output
1 votes
1 answer
1973
Conversion of binary search tree into a Max heap takes:O(n) timeO(nlog n) timeNone
1 votes
0 answers
1974
StateTrue/False:Conversion of Max heap into a binary search tree takes O(n) time.
1 votes
2 answers
1975
int main(){float sum, i = 1.0, j = 2.0;while (i/j 0.0625){j = j + j;printf("%f", i+j);}}The number of times printf statement is executed is:
1 votes
2 answers
1977
AVL tree is constructed by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order. (Assume the tree is initially empty).Then the level order traversal of the above bin...
1 votes
1 answer
1978
The height of a binary tree is defined as the number of nodes in the longest path from root to the leaf node. Let X be the height of a complete binary tree with 256 nodes...
1 votes
1 answer
1979
The number of permutations can be obtained in the output using stack assuming that input contains elements 1, 2, 3, 4, 5, 6 in any order such that 3 will poped out from s...
1 votes
2 answers
1980
Consider the following C program: Which of the following represents output of above C program?A)1, 0B)2, 0C)1, 1D)2, 1