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
Hot questions in Programming and DS
3
votes
3
answers
3081
stack underflow
A stack of size (1 to N) and the initial position of top pointer is 0. Get (i, S) is a routine to get ith element from stack ‘S’ with respect to top. Then, what is the underflow condition on stack to perform get() operation. top – i < N top – i + 1 ≤ N top – i ≤ 0 top – i + 1 ≤ 0
A stack of size (1 to N) and the initial position of top pointer is 0.Get (i, S) is a routine to get ith element from stack ‘S’ with respect to top.Then, what is the ...
Pankaj Joshi
1.9k
views
Pankaj Joshi
asked
Feb 4, 2017
DS
stack
data-structures
+
–
0
votes
0
answers
3082
Stack Permutations
Aditya Bahuguna
610
views
Aditya Bahuguna
asked
Dec 28, 2017
1
votes
0
answers
3083
Self Doubt
Given Only one of the traversal(pre,post,in) can we identify other remaining traversals using given traversals. AND if not, can we Atleast cross check from optio s given(trial and error method).
Given Only one of the traversal(pre,post,in) can we identify other remaining traversals using given traversals.AND if not, can we Atleast cross check from optio s given(...
ankit_thawal
220
views
ankit_thawal
asked
Jan 19, 2018
2
votes
0
answers
3084
me test series
what is the output of above code using call by copy restore??????/is call by is in gate syllabus
what is the output of above code using call by copy restore??????/is call by is in gate syllabus
eyeamgj
387
views
eyeamgj
asked
Jan 10, 2018
2
votes
0
answers
3085
programming & DS
Which of the following is true? A When stack is implemented using two queues, then insertion will take O(1) time while deletion will take O(n) time. B When stack is implemented using linked list, then insertion and deletion will take O(1) time C Stack is used to implement breadth first search D Both (a) and (b)
Which of the following is true?AWhen stack is implemented using two queues, then insertion will take O(1) time while deletion will take O(n) time.BWhen stack is implement...
Kaluti
264
views
Kaluti
asked
Jan 15, 2018
–1
votes
0
answers
3086
ACE TEST
dm4006
168
views
dm4006
asked
Jan 30, 2018
0
votes
1
answer
3087
Order Of Evaluation
What is the output generated by this code? main(){ int i=0; printf("%d %d %d %d %d %d %d", i++, ++i, i, i++, i, ++i, i++); } 4 4 3 2 2 2 0 4 5 5 2 5 5 0 0 2 2 2 2 4 4 Compiler Dependent
What is the output generated by this code?main(){ int i=0; printf("%d %d %d %d %d %d %d", i++, ++i, i, i++, i, ++i, i++); }4 4 3 2 2 2 04 5 5 2 5 5 00 2 2 2 2 4 4Compiler...
hacker16
1.2k
views
hacker16
asked
Nov 17, 2017
Programming in C
programming-in-c
+
–
1
votes
1
answer
3088
please explain me
Consider the following pseudo-code to perform push and pop operation on a stack using enqueue(EQ) and dequeue(DQ) operations on 2 queues q1 and q2. Let x be an element to be pushed in the stack. Answer the following questions. push(q1,q2,x) { if(q1 is ... will be the total dequeue operations on queue q2, if we perform 6 push and 2 pop operations on the above algorithm? 10 8 12 5
Consider the following pseudo-code to perform push and pop operation on a stack using enqueue(EQ) and dequeue(DQ) operations on 2 queues q1 and q2.Let x be an element to ...
mohitbawankar
481
views
mohitbawankar
asked
Dec 18, 2017
2
votes
0
answers
3089
c programming
#include<stdio.h> int main() { char arr[5][7][6]; char *p[5][7][6]; printf("%d\t", (unsigned)(arr+1)-(unsigned)arr); printf("%d", (unsigned)(p+1)-(unsigned)p); }
#include<stdio.h>int main(){char arr[5][7][6];char *p[5][7][6];printf("%d\t", (unsigned)(arr+1)-(unsigned)arr);printf("%d", (unsigned)(p+1)-(unsigned)p);}
mohitbawankar
446
views
mohitbawankar
asked
Jan 2, 2018
0
votes
0
answers
3090
Data Structure: Find 7th smallest element in Min heap
In a binary min heap with n elements, the 7th smallest element can be found in _____ ? Answer given is O(logn) and solution:- Delete the 1st smallest element O(logn) Delete the 2nd smallest element O(logn) .... ... this solution the data arrangement of the heap will be changed after performing these operation. any better solution than this???
In a binary min heap with n elements, the 7th smallest element can be found in _____ ?Answer given is O(logn) and solution:-Delete the 1st smallest element O(logn)Delete ...
Shubhanshu
1.6k
views
Shubhanshu
asked
Oct 18, 2017
Programming in C
binary-heap
time-complexity
algorithms
+
–
2
votes
0
answers
3091
Programming language
Please explain in detail
Please explain in detail
Harikesh Kumar
299
views
Harikesh Kumar
asked
Jan 14, 2018
Programming in C
java
programming
+
–
1
votes
0
answers
3092
#of BST
Find number of BST's possible with 6 nodes numbered 1,2,3,4,5 and 6 having 6 as root and height of 4 ? please explain in detail ...
Find number of BST's possible with 6 nodes numbered 1,2,3,4,5 and 6 having 6 as root and height of 4 ?please explain in detail ...
Anjan
346
views
Anjan
asked
Jan 9, 2018
DS
data-structures
binary-search-tree
+
–
27
votes
3
answers
3093
GATE CSE 2004 | Question: 37
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
Kathleen
5.7k
views
Kathleen
asked
Sep 18, 2014
DS
gatecse-2004
data-structures
binary-heap
easy
+
–
1
votes
0
answers
3094
Made easy Test
vjabhishek
221
views
vjabhishek
asked
Jan 17, 2018
1
votes
1
answer
3095
programming &DS
Kaluti
278
views
Kaluti
asked
Jan 15, 2018
0
votes
0
answers
3096
test series
dm4006
183
views
dm4006
asked
Jan 25, 2018
Programming in C
programming-in-c
ace-test-series
+
–
0
votes
0
answers
3097
C Prog
#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 is the output ?
#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...
junaid ahmad
936
views
junaid ahmad
asked
Dec 20, 2017
Programming in C
programming-in-c
output
+
–
1
votes
1
answer
3098
linked lists
Consider the following Linked list Node structure struct Node { int data; struct Node * next; } typedef struct Node Node; Consider the following function to reverse the singly linked list Node* reverse_list(Node *head) { Node *temp = NULL; Node *next ; while(head) { next = 1 ... respectively (A) head, head->next (B) head->next,head (C) NULL, head->next (D) head->next, next
Consider the following Linked list Node structurestruct Node { int data; struct Node * next; } typedef struct Node Node;Consider the following function to reverse the sin...
Parshu gate
986
views
Parshu gate
asked
Nov 11, 2017
DS
data-structures
linked-list
+
–
1
votes
1
answer
3099
GATE | GATE MOCK 2017
Consider an array consisting of –ve and +ve numbers. What would be the worst time comparisons an algorithm can take in order to segregate the numbers having same sign altogether i.e all +ve on one side and then all -ve on the other ? (A) N-1 (B) N (C) N+1 (D) (N*(N-1))/2
Consider an array consisting of –ve and +ve numbers. What would be the worst time comparisons an algorithm can take in order to segregate the numbers having same sign a...
mohit kumar 5
3.2k
views
mohit kumar 5
asked
Oct 4, 2017
–1
votes
1
answer
3100
DS COMPLETE BINARY TREE
IS IT A CBT?
IS IT A CBT?
iarnav
548
views
iarnav
asked
Jan 7, 2018
DS
data-structures
binary-tree
+
–
Page:
« prev
1
...
150
151
152
153
154
155
156
157
158
159
160
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register