Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Recent questions in Programming and DS
5
votes
2
answers
3721
Row Major
Assume that an upper triangular matrix A[0... 99, 0 ...99] is stored in a linear array C of size 5050 with row major order. If A[0, 0] is stored in C[0], find the index of C where A[70, 90] is stored in it.
Assume that an upper triangular matrix A[0... 99, 0 ...99] is stored in a linear array C of size 5050 with row major order. If A[0, 0] is stored in C[0], find the index o...
srestha
5.5k
views
srestha
asked
Jan 16, 2017
Programming in C
programming
programming-in-c
array
+
–
1
votes
0
answers
3722
MadeEasy Subject Test: Programming & DS - Binary Tree
# plz explain why option B is false ??
# plz explain why option B is false ??
Hradesh patel
256
views
Hradesh patel
asked
Jan 16, 2017
DS
made-easy-test-series
data-structures
binary-tree
+
–
7
votes
1
answer
3723
Testbook Test Series: Programming & DS - Binary Search Tree
In a binary search tree, the key with value $5$ was searched after traversing nodes with values $1, 3, 4, 6, 7, 8, 9$ not necessarily in this order. Lets $P$ is the probability that $3rd$ element on the search path ... different orders possible in which given nodes can be traversed before finding node with value $5$. Find $\frac{N}{10}+P$
In a binary search tree, the key with value $5$ was searched after traversing nodes with values $1, 3, 4, 6, 7, 8, 9$ not necessarily in this order. Lets $P$ is the proba...
Pankaj Joshi
1.0k
views
Pankaj Joshi
asked
Jan 16, 2017
Programming in C
testbook-test-series
probability
data-structures
binary-search-tree
combinatory
+
–
4
votes
2
answers
3724
MADE EASY TEST SERIES
Suppose we used a hash function H(n) to hash ‘n’ distinct elements (keys) into an array T of length ‘m’. What is the expected number of colliding pairs of elements, if we used simple uniform hashing?
Suppose we used a hash function H(n) to hash ‘n’ distinct elements (keys) into an array T of length ‘m’.What is the expected number of colliding pairs of elements...
User007
801
views
User007
asked
Jan 16, 2017
DS
hashing
+
–
0
votes
4
answers
3725
merge sort
harshit agarwal
1.2k
views
harshit agarwal
asked
Jan 15, 2017
Programming in C
merge-sort
algorithms
sorting
+
–
0
votes
1
answer
3726
Virtual Gate Test Series: Programming & DS - Define
#define THIS 0 #define THAT 0 #include <stdio.h> int main(int argc, char const *argv[]) { #ifdef THIS && THAT printf("if\n"); #else printf("else\n"); #endif return 0; } What is the output? What happens if the first two lines are not initializing. i.e., #define THIS #define THAT
#define THIS 0 #define THAT 0 #include <stdio.h int main(int argc, char const *argv[]) { #ifdef THIS && THAT printf("if\n"); #else printf("else\n"); #endif return 0; }Wha...
Dulqar
274
views
Dulqar
asked
Jan 15, 2017
Programming in C
programming-in-c
virtual-gate-test-series
+
–
0
votes
0
answers
3727
Ace test
Suppose there is an integer array m[4,5], address of m[0,0] is 1000, and m[0,3] is 1006. The address of m[3,4] is? the answer is given as 1038 what is wrong in my approach? 1000+2((3x6)+4)= 1044
Suppose there is an integer array m[4,5], address of m[0,0] is 1000, and m[0,3] is 1006. The address of m[3,4] is?the answer is given as 1038 what is wrong in my approach...
deepti
286
views
deepti
asked
Jan 15, 2017
0
votes
2
answers
3728
ace mock- I
iita
249
views
iita
asked
Jan 15, 2017
0
votes
1
answer
3729
Delayed Branching
Which of the following is not TRUE about "Delayed Branching" ? S1 : Delayed branding changes the semantic meaning of the original program. S2 : Delayed branching is the problem arrived because of jump instruction. (1) S1 only (2) S2 only (3) Both (1) & (2) (4) None of these Answer:3
Which of the following is not TRUE about "Delayed Branching" ?S1 : Delayed branding changes the semantic meaning of the original program. S2 : Delayed branching is the pr...
vishwa ratna
774
views
vishwa ratna
asked
Jan 15, 2017
0
votes
1
answer
3730
Say true or false?
preorder traversal of a tree resemble to the DFS traversal of graph?
preorder traversal of a tree resemble to the DFS traversal of graph?
S Ram
1.2k
views
S Ram
asked
Jan 15, 2017
Programming in C
data-structures
tree-traversal
+
–
1
votes
2
answers
3731
binary heap
Consider a binary min heap containing n elements and every node is having degree 2 ( i.e. full binary min heap tree). What is the probability of finding the largest element at the last level ? According to my understanding the largest element has to be a leaf and since leafs can be on two levels last and second last therefore the probability should be 1/2
Consider a binary min heap containing n elements and every node is having degree 2 ( i.e. full binary min heap tree). What is the probability of finding the largest eleme...
Pankaj Joshi
2.1k
views
Pankaj Joshi
asked
Jan 14, 2017
DS
data-structures
binary-heap
geeksforgeeks-test-series
+
–
1
votes
1
answer
3732
MadeEasy Subject Test: Programming & DS - Heap
How come the answer is 8 I think it shoulb be 4.
How come the answer is 8 I think it shoulb be 4.
harshit agarwal
694
views
harshit agarwal
asked
Jan 14, 2017
DS
made-easy-test-series
data-structures
binary-heap
+
–
1
votes
1
answer
3733
Quick Sort
What is the complexity of quickSort on Singly Linked List ?
What is the complexity of quickSort on Singly Linked List ?
Atul Verma12
332
views
Atul Verma12
asked
Jan 14, 2017
1
votes
1
answer
3734
doubly linked list
A doubly linked list with head and tail pointers can be reversed in O(1) time? True or False but how?
A doubly linked list with head and tail pointers can be reversed in O(1) time? True or False but how?
Atul Verma12
627
views
Atul Verma12
asked
Jan 14, 2017
0
votes
1
answer
3735
Ace test series
gautamcse27
236
views
gautamcse27
asked
Jan 13, 2017
Programming in C
ace-test-series
+
–
1
votes
0
answers
3736
test series
gautamcse27
274
views
gautamcse27
asked
Jan 13, 2017
Programming in C
test-series
+
–
2
votes
1
answer
3737
MadeEasy Subject Test: Programming & DS - Queues
# plz check ??? i missed something
# plz check ??? i missed something
Hradesh patel
467
views
Hradesh patel
asked
Jan 13, 2017
DS
made-easy-test-series
data-structures
queue
+
–
0
votes
1
answer
3738
Tree BFS
int func(Node root) { int x = 0; int y = 0; queue Q; Q.push(root); while(!Q.empty()) { Node u = Q.top(); Q.pop(); if(u->left == NULL && u->right == NULL) x++; if(u->left != NULL) { y++; Q.push(u->left); } if(u->right != NULL) { y++; Q.push(u->right); } } return x+y; } Above code segment is executed on the following rooted tree: What will be the output?
int func(Node root) { int x = 0; int y = 0; queue Q; Q.push(root); while(!Q.empty()) { Node u = Q.top(); Q.pop(); if(u->left == NULL && u->right == NULL) x++; if(u->left ...
dd
482
views
dd
asked
Jan 13, 2017
Programming in C
breadth-first-search
programming-in-c
binary-tree
+
–
5
votes
2
answers
3739
Tree DFS
int func(Node root) { if(root == NULL) return 0; else if(root->left == NULL && root->right == NULL) return 2; else return(3 + func(root->left) + func(root->right)); } Above code is executed on the following rooted tree. What will be the output?
int func(Node root) { if(root == NULL) return 0; else if(root->left == NULL && root->right == NULL) return 2; else return(3 + func(root->left) + func(root->right)); }Abov...
dd
943
views
dd
asked
Jan 13, 2017
Programming in C
depth-first-search
algorithms
data-structures
binary-tree
+
–
0
votes
0
answers
3740
geeks quiz
.....
.....
kirti singh
358
views
kirti singh
asked
Jan 13, 2017
Page:
« prev
1
...
182
183
184
185
186
187
188
189
190
191
192
...
309
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register