Recent questions in Programming and DS

0 votes
0 answers
2381
0 votes
0 answers
2382
Assume that letters p, q, r, s, t and q have probabilities 1/2, 1/4, 1/8, 1/16, 1/32 and 1/32 respectively. The difference in the average length of the message without an...
0 votes
0 answers
2383
#include<stdio.h int reverse(int); int main() { int num=4; reverse(num); return 0; } int reverse(num) { if(num==0) return 0; else printf("%d",num); reverse(num ); }What i...
1 votes
2 answers
2384
Assuming no syntax error:
0 votes
1 answer
2385
How to work on such question ? Answer is : 19#include <stdio.h>int main() { int i = 4, ans; ans = ++i + ++i + ++i; printf("%d\n", ans); return 0;}
0 votes
0 answers
2386
0 votes
0 answers
2387
5 votes
1 answer
2388
8 votes
1 answer
2389
Q.Consider a four labeled 1, 2, 3, 4. The number of distinct binary tree are possible such that whose inorder traversal is 1, 2, 3, 4 are _________Answer must be 14 right...
0 votes
1 answer
2391
Given an initially empty Binary search tree how many different order of insertion order A,B,C,D,E,F,G that returns minimum height tree?
1 votes
2 answers
2392
Plz Explain with a diagram .
0 votes
0 answers
2393
Insert these element in avl tree15,20,24,10,13,7,30,36,25And then delete 24,20Please explain step by stepI am confuse
1 votes
1 answer
2396
Consider the following function:int f(int n){staticint i=1;if(n>5)return n;n=n+i;return f(n);}The value of f(1) is:
0 votes
1 answer
2397
#include<stdio.h>void main(){printf("Hello\b\b\b\b\b");printf("Hi!\b\b\bBye");}
0 votes
1 answer
2398
#include<stdio.h>void main(){printf("Hello\b\b\b\b\b");printf("Hi!\b\b\bBye");}
6 votes
3 answers
2399
Q.A strictly binary tree with 10 leavesA) cannot have more than 19 nodesB) has exactly 19 nodesC)has exactly 17 nodesD) has exactly 20 nodes