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
0
votes
0
answers
1981
ACE Engineering academy. Data structures. Question 3
Assume that Tridiagonal Matrix of order (4 x 4) is mapped into a one-dimensional array by diagonals, starting with the lowest diagonal. (1) The location of an element A(4.3) is (a) t[1] (b) t[3] (c) t[4] (d) t2 Answer is given as d. Can someone please help me visualize it? Im not sure I understand how they arrange the matrix into array.
Assume that Tridiagonal Matrix of order (4 x 4) is mapped into a one-dimensional array by diagonals, starting with the lowest diagonal. (1) The location of an element A(4...
nateshmbhat
1.0k
views
nateshmbhat
asked
Oct 23, 2018
0
votes
0
answers
1982
Self doubt
T(n)= T(4n/5)+O(n)... we can't apply master's theorem to solve it??? And if not then how are we going solve this..
T(n)= T(4n/5)+O(n)... we can't apply master's theorem to solve it??? And if not then how are we going solve this..
saif
263
views
saif
asked
Dec 1, 2018
0
votes
0
answers
1983
Tower of Hanoi Please explain this question
Ankit Garg 2
353
views
Ankit Garg 2
asked
Nov 26, 2018
DS
towers-of-hanoi
+
–
0
votes
1
answer
1984
Gateforum Test Series: Programming & DS - Programming In C
What will be the output of the following program [Addresses of the variables are assigned continuous] #include<stdio.h> void main() { int a = 4, b = 8, c = 12, d, e, f ; int *x=&a , *y=&b, *z =&c ; d =x - y ; e =y - z ; f = d - e ; printf("%d" ; f) ; } (A)Compiler error (B) -8; (C)8; (D) 2;
What will be the output of the following program[Addresses of the variables are assigned continuous]#include<stdio.h>void main(){int a = 4, b = 8, c = 12, d, e, f ;int *x...
Mahbub Alam
534
views
Mahbub Alam
asked
Nov 19, 2018
Programming in C
gateforum-test-series
programming
programming-in-c
+
–
0
votes
1
answer
1985
c_prog
int m= -14; int n=6; int o; o=m%++n; n+=m++ - o; m<<=(o^n)&3; assuming 2's complement arithemetic ; what should be the final value of m,n,o??
int m= -14;int n=6;int o;o=m%++n;n+=m++ - o;m<<=(o^n)&3;assuming 2's complement arithemetic ; what should be the final value of m,n,o??
Gate Fever
939
views
Gate Fever
asked
Nov 10, 2018
1
votes
0
answers
1986
Self doubt
What happens to the code which is present after a return..?? Compilation error, or it is ignored or something else
What happens to the code which is present after a return..??Compilation error, or it is ignored or something else
saif
220
views
saif
asked
Nov 28, 2018
0
votes
0
answers
1987
Self doubt C programming
https://gateoverflow.in/45555/c-programming-predict-the-output main() { { extern int i; int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i; rude explained how output is printed but its giving error when i'm trying to run the program here https://ideone.com/xteXgV
https://gateoverflow.in/45555/c-programming-predict-the-outputmain() { { extern int i; int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } print...
Mk Utkarsh
621
views
Mk Utkarsh
asked
Nov 10, 2018
Programming in C
programming-in-c
output
+
–
1
votes
1
answer
1988
homework
Given an array A[-1:6,-2:10]. The base address of array is 1000. If every elements takes 4 bytes for storage then compute the address of element A[5,7] answer given is 1348
Given an array A[-1:6,-2:10]. The base address of array is 1000. If every elements takes 4 bytes for storage then compute the address of element A[5,7]answer given is 134...
deepanshu sharma 3
379
views
deepanshu sharma 3
asked
Nov 17, 2018
0
votes
0
answers
1989
Data structure
garimanand
575
views
garimanand
asked
Nov 18, 2018
0
votes
1
answer
1990
Data Structure Doubt
Which of the following is true? A . In a sorted array of n' distinct elements, deletion of an element take Ο(log n) time B. In sorted array of n' distinct elements, insertion of an element take Ο(log n) time. C. In unsorted array of n' ... finding ith largest element take Ο(1) time D. In unsorted array of n' distinct elements, insertion of an element take Ω(log n) time
Which of the following is true?A . In a sorted array of ‘n’ distinct elements, deletion of an element take Ο(log n) timeB. In sorted array of ‘n’ distinct eleme...
Na462
3.3k
views
Na462
asked
May 10, 2018
Programming in C
data-structures
+
–
6
votes
2
answers
1991
Min Heap
In a min-heap, the next largest element of a particular element can be found in ___ time. A) O(1) B) O(log n) C) O(n)
In a min-heap, the next largest element of a particular element can be found in ___ time.A) O(1)B) O(log n)C) O(n)
Shivam Chauhan
5.0k
views
Shivam Chauhan
asked
Oct 31, 2017
DS
data-structures
binary-heap
time-complexity
+
–
2
votes
1
answer
1992
DS:- Construct unique BST
What is the worst case time complexity to construct unique BST from a:) Inorder and preorder a:) Inorder and postorder
What is the worst case time complexity to construct unique BST froma:) Inorder and preordera:) Inorder and postorder
rahul sharma 5
468
views
rahul sharma 5
asked
Oct 2, 2017
Programming in C
data-structures
tree
binary-search-tree
+
–
0
votes
0
answers
1993
What will be the output of this code
#include<stdio.h> #include<stdlib.h> int main(int argc, char **argv) { int i, j=0; for(i=0; i<argc; i++) j = j+atoi(argv[i]); printf("%d\n", j); return 0; }
#include<stdio.h #include<stdlib.h int main(int argc, char argv) { int i, j=0; for(i=0; i<argc; i++) j = j+atoi(argv[i]); printf("%d\n", j); return 0; }
`JEET
313
views
`JEET
asked
Nov 28, 2018
0
votes
1
answer
1994
Test series
Consider unsorted doubly linked list data structure containing n items. For decrease key operation a pointer is provided to the record on which the operation is performed. An algorithm performs the following operations on the list in this order: sqrt(n) insert operations, o(nlogn) decrease key and ... of all these operations put together? (a) O(n) (b) O(n2) (c) O(n2logn) (d) O(sqrt(n))
Consider unsorted doubly linked list data structure containing n items. For decrease key operation a pointer is provided to the record on which the operation is performed...
Somoshree Datta 5
788
views
Somoshree Datta 5
asked
Oct 22, 2018
DS
data-structures
linked-list
time-complexity
+
–
0
votes
2
answers
1995
#made esay book
Number of possible ordered trees with 3 nodes x,y,z
Number of possible ordered trees with 3 nodes x,y,z
amit166
259
views
amit166
asked
Nov 24, 2018
0
votes
0
answers
1996
Gate overflow for gate cse 2019
anji
576
views
anji
asked
Oct 28, 2018
0
votes
0
answers
1997
Infix to postfix (Complicated declarations)
Please convert it to postfix by using stack and explain in detail void (*bsd_signal(int sig, void (*func)(int)))(int);
Please convert it to postfix by using stack and explain in detailvoid (*bsd_signal(int sig, void (*func)(int)))(int);
Mk Utkarsh
847
views
Mk Utkarsh
asked
Oct 20, 2018
Programming in C
stack
data-structures
infix-prefix
+
–
0
votes
0
answers
1998
class problem
What is the minimum runtime to reverse a doubly linked list? answer given O(n) . shouldn't it be O(1) ?
What is the minimum runtime to reverse a doubly linked list?answer given O(n) . shouldn't it be O(1) ?
deepanshu sharma 3
430
views
deepanshu sharma 3
asked
Nov 17, 2018
0
votes
0
answers
1999
What will be the output of this code.
#include<stdio.h> #include<stdarg.h> void display(char *s, ...); void show(char *t, ...); int main() { display("Hello", 4, 12, 13, 14, 44); return 0; } void display(char *s, ...) { show(s, ...); } void ... a); } A. Error: invalid function display() call B. Error: invalid function show() call C. No error D. Error: Rvalue required for t
#include<stdio.h #include<stdarg.h void display(char *s, ...); void show(char *t, ...); int main() { display("Hello", 4, 12, 13, 14, 44); return 0; } void display(char *s...
`JEET
214
views
`JEET
asked
Nov 28, 2018
0
votes
1
answer
2000
BFS Traversal
Maximum number of BFS Traversal Possible on BST of height 3 is ..........
Maximum number of BFS Traversal Possible on BST of height 3 is ..........
Na462
1.0k
views
Na462
asked
Oct 21, 2018
Programming in C
breadth-first-search
algorithms
data-structures
+
–
Page:
« prev
1
...
95
96
97
98
99
100
101
102
103
104
105
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register