Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged data-structures
9
votes
1
answer
1381
DS+Permutation
An item that is read as input can either be pushed to the stack and later popped and printed or printed directly. Number of print permutations that can be obtained using stack, if the input sequence is $1, 2, 3, 4, 5$ in that order is __________.
An item that is read as input can either be pushed to the stack and later popped and printed or printed directly. Number of print permutations that can be obtained using ...
Rahul Jain25
1.5k
views
Rahul Jain25
asked
Oct 6, 2016
DS
data-structures
stack
combinatory
+
–
2
votes
3
answers
1382
Data Strucutre Test
Rahul Jain25
458
views
Rahul Jain25
asked
Oct 6, 2016
Programming in C
data-structures
depth-first-search
+
–
1
votes
1
answer
1383
#ds / data structure
Deletion at ending 1. Linked list =O(n) 2. Array = O(1) 3. Dynamic array =O(1) Correct? But given is O(n) for dynamic array
Deletion at ending1. Linked list =O(n)2. Array = O(1)3. Dynamic array =O(1)Correct?But given is O(n) for dynamic array
Anil Khatri
366
views
Anil Khatri
asked
Oct 4, 2016
DS
data-structures
+
–
2
votes
1
answer
1384
GATE Overflow | Algorithms | Test 1 | Question: 14
The result of performing an inorder search on the given tree is s y x z v u t y s x z v u t s y v u t z x v u t z x y s
The result of performing an inorder search on the given tree iss y x z v u ty s x z v u ts y v u t z xv u t z x y s
Bikram
257
views
Bikram
asked
Oct 4, 2016
DS
go-alogrithms-1
data-structures
binary-tree
tree-traversal
+
–
1
votes
1
answer
1385
avl tree
what is the time complexity of creating an avl tree??????
what is the time complexity of creating an avl tree??????
Rajnish Kumar
560
views
Rajnish Kumar
asked
Oct 1, 2016
DS
data-structures
+
–
1
votes
1
answer
1386
UGC NET CSE | August 2016 | Part 3 | Question: 35
If there are $n$ integers to sort, each integer has d digits, and each digit is in the set $\left\{1, 2, …, k\right\}$, radix sort can sort the numbers in : $O (k (n + d))$ $O (d (n + k))$ $O ((n + k) l g d)$ $O ((n + d) l g k)$
If there are $n$ integers to sort, each integer has d digits, and each digit is in the set $\left\{1, 2, …, k\right\}$, radix sort can sort the numbers in :$O (k (n + d...
makhdoom ghaya
724
views
makhdoom ghaya
asked
Oct 1, 2016
DS
ugcnetcse-aug2016-paper3
data-structures
radix-sort
+
–
1
votes
1
answer
1387
UGC NET CSE | August 2016 | Part 3 | Question: 34
A priority queue is implemented as a max-heap. Initially, it has five elements. The levelorder traversal of the heap is as follows : 20, 18, 15, 13, 12 Two new elements 10' and 17' are inserted in the heap in that order. The level-order traversal of the heap after ... 18, 17, 12, 13, 10, 15 20, 18, 17, 10, 12, 13, 15 20, 18, 17, 13, 12, 10, 15
A priority queue is implemented as a max-heap. Initially, it has five elements. The levelorder traversal of the heap is as follows :20, 18, 15, 13, 12Two new elements ‘...
makhdoom ghaya
2.6k
views
makhdoom ghaya
asked
Oct 1, 2016
DS
ugcnetcse-aug2016-paper3
data-structures
priority-queue
+
–
1
votes
4
answers
1388
UGC NET CSE | August 2016 | Part 3 | Question: 33
Consider a weighted complete graph $G$ on the vertex set $\left\{ν_{1} , ν_{2},.... ν_{n} \right\}$ such that the weight of the edge $(ν_{i} , ν_{j})$ is $4 | i – j|$. The weight of minimum cost spanning tree of $G$ is : $4n^{2}$ $n$ $4n – 4$ $2n – 2$
Consider a weighted complete graph $G$ on the vertex set $\left\{ν_{1} , ν_{2},.... ν_{n} \right\}$ such that the weight of the edge $(ν_{i} , ν_{j})$ is $4 | i – ...
makhdoom ghaya
1.8k
views
makhdoom ghaya
asked
Oct 1, 2016
DS
ugcnetcse-aug2016-paper3
data-structures
spanning-tree
+
–
1
votes
1
answer
1389
UGC NET CSE | August 2016 | Part 3 | Question: 32
Consider a hash table of size $m = 10000$, and the hash function $h(K) = floor (m(KA \bmod 1))$ for $A = ( \sqrt{5} – 1)/2$. The key $123456$ is mapped to location ______. $46$ $41$ $43$ $48$
Consider a hash table of size $m = 10000$, and the hash function $h(K) = floor (m(KA \bmod 1))$ for $A = ( \sqrt{5} – 1)/2$. The key $123456$ is mapped to location ____...
makhdoom ghaya
863
views
makhdoom ghaya
asked
Oct 1, 2016
DS
ugcnetcse-aug2016-paper3
data-structures
hashing
+
–
2
votes
2
answers
1390
Infix to postfix
Convert the infix to postfix and prefix expression 1) log3! ^log4 *log log 6/7*4! 2)log3!^sin 2*cos 3
Convert the infix to postfix and prefix expression1) log3! ^log4 *log log 6/7*4!2)log3!^sin 2*cos 3
Amit puri
2.7k
views
Amit puri
asked
Sep 29, 2016
DS
data-structures
infix-prefix
stack
+
–
1
votes
1
answer
1391
Hashing
using Method : Fold shift , we can find key then what use of Fold shift in Hashing
using Method : Fold shift , we can find keythen what use of Fold shift in Hashing
Anil Khatri
993
views
Anil Khatri
asked
Sep 28, 2016
DS
data-structures
hashing
+
–
3
votes
2
answers
1392
linked list
Two linked lists having n and m elements are stored in sorted order. What is the worst case complexity of program to print common elements of two lists ? $\begin{align*} &A. \ \ O(n) \\ &B. \ \ \text{max}(m,n) \\ &C. \ \ \text{min}(m,n) \\ &D. \ \ m+n \end{align*}$
Two linked lists having n and m elements are stored in sorted order. What is the worst case complexity of program to print common elements of two lists ?$\begin{align*} &...
Vishal Goyal
705
views
Vishal Goyal
asked
Sep 26, 2016
DS
data-structures
linked-list
time-complexity
+
–
0
votes
2
answers
1393
UGC NET CSE | August 2016 | Part 2 | Question: 25
Given the following prefix expression : $^{*} + 3 + 3 ↑ 3 + 3 3 3$ What is the value of the prefix expression ? $2178$ $2199$ $2205$ $2232$
Given the following prefix expression :$^{*} + 3 + 3 ↑ 3 + 3 3 3$What is the value of the prefix expression ?$2178$ $2199$$2205$ $2232$
makhdoom ghaya
5.2k
views
makhdoom ghaya
asked
Sep 26, 2016
DS
ugcnetcse-aug2016-paper2
data-structures
infix-prefix
+
–
1
votes
1
answer
1394
UGC NET CSE | August 2016 | Part 2 | Question: 24
Consider the following statements : $S_{1}$ : A queue can be implemented using two stacks. $S_{2}$ : A stack can be implemented using two queues. Which of the following is correct ? $S_{1}$ is correct and $S_{2}$ is not correct. $S_{1}$ is not ... $S_{1}$ and $S_{2}$ are correct. Both $S_{1}$ and $S_{2}$ are not correct.
Consider the following statements :$S_{1}$ : A queue can be implemented using two stacks.$S_{2}$ : A stack can be implemented using two queues.Which of the following is c...
makhdoom ghaya
4.6k
views
makhdoom ghaya
asked
Sep 26, 2016
DS
ugcnetcse-aug2016-paper2
data-structures
queue
stack
+
–
0
votes
1
answer
1395
UGC NET CSE | August 2016 | Part 2 | Question: 23
The runtime for traversing all the nodes of a binary search tree with $n$ nodes and printing them in an order is $O(\lg n)$ $O(n \lg n)$ $O(n)$ $O(n^{2})$
The runtime for traversing all the nodes of a binary search tree with $n$ nodes and printing them in an order is$O(\lg n)$$O(n \lg n)$ $O(n)$$O(n^{2})$
makhdoom ghaya
9.1k
views
makhdoom ghaya
asked
Sep 26, 2016
DS
ugcnetcse-aug2016-paper2
data-structures
binary-search-tree
+
–
0
votes
1
answer
1396
UGC NET CSE | August 2016 | Part 2 | Question: 21
Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the representation, which of the following ... linked list. Deletion of the front node of the linked list. Deletion of the last node of the linked list.
Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of ...
makhdoom ghaya
2.1k
views
makhdoom ghaya
asked
Sep 24, 2016
DS
ugcnetcse-aug2016-paper2
data-structures
linked-list
+
–
3
votes
3
answers
1397
time complexity
Find the time complexity of the following snippets 1. for$\left ( i=1;i\leqslant n;i++ \right )$ for$\left ( j=n/3;j\leqslant 2n;j=j+n/3 \right )$ $x=x+1;$ 2. for$\left ( i=1;i\leqslant n;i++ \right )$ for$\left ( j=1;j\leqslant n;j=j+i \right )$ $x=x+1;$
Find the time complexity of the following snippets1.for$\left ( i=1;i\leqslant n;i++ \right )$ for$\left ( j=n/3;j\leqslant 2n;j=j+n/3 \right )$ $x=x...
Vishal Goyal
832
views
Vishal Goyal
asked
Sep 24, 2016
DS
data-structures
time-complexity
algorithms
expression
+
–
0
votes
1
answer
1398
Linked Lists
Q)The below code returns decimal value of binary linked list int val(struct Node *head) { struct Node *p = head; int val2= 0; while (p!= NULL) { XYZ;//fill the contents of XYZ p = p→next; } return val2; } What is XYZ in above code ? Please provide a sound explaination too.
Q)The below code returns decimal value of binary linked list int val(struct Node *head) { struct Node *p = head; int val2= 0; while (p!= NULL) { XYZ;//fill the contents o...
Manikant Kumar
573
views
Manikant Kumar
asked
Sep 23, 2016
DS
data-structures
linked-list
+
–
1
votes
0
answers
1399
no of balanced paraenthesis
The no of different balanced parenthesizes possible with n pairs of parenthesis? A. B. C. (2n)! D. n! please explain the answer.
The no of different balanced parenthesizes possible with n pairs of parenthesis?A. B. C. (2n)!D. n!please explain the answer.
indrajeet
417
views
indrajeet
asked
Sep 18, 2016
Programming in C
data-structures
gatebook
+
–
1
votes
2
answers
1400
UGC NET CSE | June 2010 | Part 2 | Question: 32
Which of the following expression is represented by the parse tree ? $(A + B) ^{*} C$ $A + ^{*} BC$ $A + B * C$ $A * C + B$
Which of the following expression is represented by the parse tree ?$(A + B) ^{*} C$$A + ^{*} BC$$A + B * C$$A * C + B$
makhdoom ghaya
2.1k
views
makhdoom ghaya
asked
Sep 16, 2016
DS
ugcnetcse-june2010-paper2
data-structures
tree
+
–
1
votes
2
answers
1401
UGC NET CSE | June 2010 | Part 2 | Question: 25
In a $B$ tree of order $5$, the following keys are inserted as follows : $7, 8, 1, 4, 13, 20, 2, 6$ and $5$ How many elements are present in the root of the tree ? $1$ $2$ $3$ $4$
In a $B$ tree of order $5$, the following keys are inserted as follows : $7, 8, 1, 4, 13, 20, 2, 6$ and $5$ How many elements are present in the root of the tree ?$1$ $2$...
makhdoom ghaya
4.6k
views
makhdoom ghaya
asked
Sep 15, 2016
DS
ugcnetcse-june2010-paper2
data-structures
b-and-bplus-trees
+
–
0
votes
3
answers
1402
UGC NET CSE | June 2010 | Part 2 | Question: 24
A chained hash table has an array size of $100$. What is the maximum number of entries that can be placed in the table ? $100$ $200$ $10000$ There is no upper limit
A chained hash table has an array size of $100$. What is the maximum number of entries that can be placed in the table ?$100$$200$$10000$There is no upper limit
makhdoom ghaya
2.3k
views
makhdoom ghaya
asked
Sep 15, 2016
DS
ugcnetcse-june2010-paper2
data-structures
hashing
+
–
2
votes
1
answer
1403
UGC NET CSE | June 2010 | Part 2 | Question: 23
In a complete binary tree of n nodes, how far are the two most distant nodes ? Assume each edge in the path counts as ! About $\log_{2} n$ About $2 \log_{2} n$ About $n \log_{2} n$ About $2n$
In a complete binary tree of n nodes, how far are the two most distant nodes ? Assume each edge in the path counts as !About $\log_{2} n$About $2 \log_{2} n$About $n \log...
makhdoom ghaya
5.2k
views
makhdoom ghaya
asked
Sep 15, 2016
DS
ugcnetcse-june2010-paper2
data-structures
tree
+
–
0
votes
2
answers
1404
UGC NET CSE | June 2010 | Part 2 | Question: 22
What is the most appropriate data structure to implement a priority queue ? Heap Circular array Linked list Binary tree
What is the most appropriate data structure to implement a priority queue ?HeapCircular arrayLinked listBinary tree
makhdoom ghaya
5.9k
views
makhdoom ghaya
asked
Sep 15, 2016
DS
ugcnetcse-june2010-paper2
data-structures
priority-queue
+
–
0
votes
2
answers
1405
UGC NET CSE | June 2010 | Part 2 | Question: 21
If we have six stack operationspushing and popping each of $A, B$ and $C$-such that push $(A)$ must occur before push $(B)$ which must occur before push $(C)$, then $A, C, B$ is a possible order for the pop operations, since ... not be the order the pop operations are run, if we are to satisfy the requirements described above? $ABC$ $CBA$ $BAC$ $CAB$
If we have six stack operationspushing and popping each of $A, B$ and $C$-such that push $(A)$ must occur before push $(B)$ which must occur before push $(C)$, then $A, C...
makhdoom ghaya
3.0k
views
makhdoom ghaya
asked
Sep 15, 2016
DS
ugcnetcse-june2010-paper2
data-structures
stack
+
–
1
votes
2
answers
1406
Algorithm_heap
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted into a Binary Heap such that resulted binary heap is Max Heap. Please give the ans and what is the formula for n distinct elements?
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted intoa Binary Heap such that resulted binary heap is Max Heap.Please give the ans and what is the fo...
Tariq Husain Khan
959
views
Tariq Husain Khan
asked
Sep 10, 2016
DS
data-structures
binary-heap
+
–
0
votes
4
answers
1407
UGC NET CSE | December 2010 | Part 2 | Question: 24
Linear probing suffers from a problem known as Secondary clustering Primary clustering Both (A) and (B) None of these
Linear probing suffers from a problem known asSecondary clusteringPrimary clusteringBoth (A) and (B)None of these
makhdoom ghaya
3.2k
views
makhdoom ghaya
asked
Sep 7, 2016
Others
ugcnetcse-dec2010-paper2
data-structures
hashing
+
–
0
votes
1
answer
1408
This question is from CLRS (12.1-3).
What is the difference between the binary-search-tree property and the min-heap property? Can the min-heap property be used to print out the keys of an n-node tree in sorted order in O(n) time?
What is the difference between the binary-search-tree property and the min-heap property? Can the min-heap property be used to print out the keys of an n-node tree in sor...
Hardik Vagadia
549
views
Hardik Vagadia
asked
Sep 6, 2016
DS
data-structures
binary-heap
binary-search-tree
time-complexity
+
–
8
votes
3
answers
1409
7th smallest element in a Min-Heap
In a min-heap with n elements 1). The 7th smallest element can be found in time, if duplicates are allowed ? 2). The 7th distinct smallest element can be found in time, If duplicates are allowed ?
In a min-heap with n elements1). The 7th smallest element can be found in time, if duplicates are allowed ?2). The 7th distinct smallest element can be found in time, I...
Kapil
4.0k
views
Kapil
asked
Sep 4, 2016
DS
data-structures
binary-heap
time-complexity
+
–
0
votes
2
answers
1410
build heap
how to merge two binary max heaps ? size of first heap is m+n and size of second heap is n and also find the complexity.
how to merge two binary max heaps ?size of first heap is m+n and size of second heap is nand also find the complexity.
Anil Khatri
843
views
Anil Khatri
asked
Sep 4, 2016
DS
data-structures
binary-heap
time-complexity
+
–
Page:
« prev
1
...
42
43
44
45
46
47
48
49
50
51
52
...
60
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register