Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged data-structures
2
votes
1
answer
1501
ISRO2008-71
The time required to search an element in a linked list of length n is $O(\log_2 n)$ $O(n)$ $O(1)$ $O(n^2)$
The time required to search an element in a linked list of length n is$O(\log_2 n)$$O(n)$$O(1)$$O(n^2)$
go_editor
18.0k
views
go_editor
asked
Jun 13, 2016
DS
isro2008
data-structures
linked-list
time-complexity
+
–
9
votes
1
answer
1502
ISRO2008-70
Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of the stack B can be only be printed. In this arrangement, which of the following permutations of a, b, c are not possible? b a c b c a c a b a b c
Stack A has the entries a, b, c (with a on top). Stack B is empty. An entry popped out of stack A can be printed immediately or pushed to stack B. An entry popped out of ...
go_editor
13.4k
views
go_editor
asked
Jun 13, 2016
DS
isro2008
data-structures
stack
+
–
1
votes
1
answer
1503
UGC NET CSE | September 2013 | Part 2 | Question: 11
The min. number of nodes in a binary tree of depth d (root at level 0) is $(2^d + 1)$ $(2^{(d+1)} - 1)$ $d$ $d + 1$
The min. number of nodes in a binary tree of depth d (root at level 0) is$(2^d + 1)$$(2^{(d+1)} - 1)$$d$$d + 1$
shivani2010
4.2k
views
shivani2010
asked
Jun 9, 2016
DS
binary-tree
data-structures
ugcnetsep2013ii
+
–
2
votes
0
answers
1504
ISI2012-PCB-CS-5b
Let $T$ be an AVL tree for storing a set of $n$ integers. Insertions and deletions in $T$ can hence be done in $O(\log n)$ time. Given two integers $a$ and $b, \: a < b$, you have to output nab, the number of integers in T whose ... $T$ and its insertion algorithm are required? Give a pseudo-code for computing $n_{ab}$.
Let $T$ be an AVL tree for storing a set of $n$ integers. Insertions and deletions in $T$ can hence be done in $O(\log n)$ time. Given two integers $a$ and $b, \: a < b$,...
go_editor
392
views
go_editor
asked
Jun 3, 2016
DS
descriptive
isi2012-pcb-cs
data-structures
avl-tree
+
–
0
votes
0
answers
1505
height of the binary tree..
A weight balanced tree is a binary tree in which for each node, the no. of nodes in the left subtree is atleast half and at most twice the no. of nodes in the right sub tree. The maximum possible height of such a tree with n nodes is best described by which of the following? (a) log2n (b) log4/3n (c) log3n (d) log3/2n
A weight balanced tree is a binary tree in which for each node, the no. of nodes in the left subtree is atleast half and at most twice the no. of nodes in the right sub t...
padmaja
247
views
padmaja
asked
Jun 2, 2016
DS
data-structures
+
–
1
votes
1
answer
1506
BST
A data structure is required for storing the set of integers such that each of the following operations can be done in O(log n) time, where n is the number of elements in the set 1. Deletion of the smallest element 2. Insertion of an element if it is not already present in ... not a balance bst b) a balance bst but not a heap c.) Both balance bst and a heap d.) Neither balance bst nor a heap
A data structure is required for storing the set of integers such that each of the following operations can be done in O(log n) time, where n is the number of elements in...
gshivam63
821
views
gshivam63
asked
May 31, 2016
DS
data-structures
avl-tree
+
–
0
votes
2
answers
1507
Post order traversal
Post order traversal of a BST is 35,50,55,60,50,100.then what can you say about the tree? (A) Min heap (B) Max heap (C) Strict binary tree (D) None of these
Post order traversal of a BST is 35,50,55,60,50,100.then what can you say about the tree?(A) Min heap(B) Max heap(C) Strict binary tree(D) None of these
gshivam63
2.9k
views
gshivam63
asked
May 31, 2016
DS
data-structures
binary-search-tree
+
–
2
votes
1
answer
1508
ISI2014-PCB-CS-2a
Let $B$ be a rooted binary tree of $n$ nodes. Two nodes of $B$ are said to be a sibling pair if they are the children of the same parent. For example, given the binary tree in Figure 1, the sibling pairs are (2, 3) and (6, 7). Design an $O(n)$ time algorithm that prints all the sibling pairs of $B$.
Let $B$ be a rooted binary tree of $n$ nodes. Two nodes of $B$ are said to be a sibling pair if they are the children of the same parent. For example, given the binary tr...
go_editor
544
views
go_editor
asked
May 31, 2016
DS
descriptive
isi2014-pcb-cs
data-structures
binary-tree
+
–
14
votes
2
answers
1509
ISI2015-PCB-CS-3a
Consider a linked list containing $n$ nodes, where each node contains two pointers $ptr1$ and $ptr2$. For each node, $ptr1$ points to the next node of the list. Describe how pointer $ptr2$ should be set up for each node so that you will be able to locate the $i$-th node from the start node in the list traversing no more than $[\log\: i] + [i/2]$ nodes.
Consider a linked list containing $n$ nodes, where each node contains two pointers $ptr1$ and $ptr2$. For each node, $ptr1$ points to the next node of the list. Describe ...
go_editor
1.8k
views
go_editor
asked
May 29, 2016
DS
descriptive
isi2015-pcb-cs
data-structures
linked-list
+
–
1
votes
1
answer
1510
Difference between Abstract data type and Data structure ?
are stack and queue abstract datatype ? then why are they mentioned as linear "data structures".
are stack and queue abstract datatype ? then why are they mentioned as linear "data structures".
suchismith roy
3.3k
views
suchismith roy
asked
May 26, 2016
Programming in C
data-structures
+
–
2
votes
2
answers
1511
CMI2013-A-03
When a user submits a query, a search engine does the following. For every webpage that has been visited by the search engine, it computes a score indicating how relevant that page is to the query. Finally, it reports the pages with the top k scores on the ... the user. A good data structure for accumulating the scores and ranking them is: a queue a heap a stack a binary search tree
When a user submits a query, a search engine does the following. For every webpage that has been visited by the search engine, it computes a score indicating how relevant...
go_editor
1.2k
views
go_editor
asked
May 23, 2016
DS
cmi2013
data-structures
binary-search-tree
+
–
8
votes
1
answer
1512
CMI2012-B-07
We use the notation $[x1,x2,...,xn]$ to denote a list of integers. $[]$ denotes the empty list, and $[n]$ is the list consisting of one integer $n$. For a nonempty list l, $head(l)$ returns the first element of $l$, and $tail(l)$ returns the list ... (tail(l)) then return g(tail(l)) else return(false) When does $f(l)$ return the value true for an input $l$? Explain your answer.
We use the notation $[x1,x2,...,xn]$ to denote a list of integers. $[]$ denotes the empty list, and $[n]$ is the list consisting of one integer $n$. For a nonempty list l...
go_editor
1.1k
views
go_editor
asked
May 23, 2016
DS
cmi2012
descriptive
data-structures
linked-list
+
–
1
votes
2
answers
1513
tree data-structure
Which of the following data structures will be the most efficient for inserting a number into a sorted list of numbers? Queue Stack Linked list Array
Which of the following data structures will be the most efficient for inserting a number into a sorted list of numbers?QueueStackLinked listArray
Sourabh Kumar
913
views
Sourabh Kumar
asked
May 20, 2016
Programming in C
data-structures
+
–
0
votes
1
answer
1514
Algo
Consider an array size of 10 and insertion of 10 element in it.If first five element are inserted at loc =0 and rest five element are at loc=2 then the total number of shifting of elements is: 35 20 45 0
Consider an array size of 10 and insertion of 10 element in it.If first five element are inserted at loc =0 and rest five element are at loc=2then the total number of shi...
ManojK
397
views
ManojK
asked
May 20, 2016
DS
data-structures
array
+
–
0
votes
1
answer
1515
Algo
Which of the following data structure will be most efficient for inserting a number into a sorted list of numbers ? Stack Queue Linked List Array
Which of the following data structure will be most efficient for inserting a number into a sorted list of numbers ?StackQueueLinked ListArray
ManojK
516
views
ManojK
asked
May 20, 2016
Algorithms
algorithms
data-structures
sorting
+
–
0
votes
1
answer
1516
Time complexity to search for an element in a balanced bst with (2n)! Elements?
gshivam63
421
views
gshivam63
asked
May 19, 2016
DS
data-structures
time-complexity
binary-search-tree
+
–
0
votes
1
answer
1517
introduction to algorithm 6.2.3 exercise question
$6.2-3$ What is the effect of calling MAX-HEAPIFY(A,i) when the element A[i] is larger that its children?
$6.2-3$What is the effect of calling MAX-HEAPIFY(A,i) when the element A[i] is larger that its children?
Shyam Singh 1
842
views
Shyam Singh 1
asked
May 17, 2016
DS
data-structures
binary-heap
descriptive
+
–
0
votes
1
answer
1518
data structure
Sanjay Sharma
341
views
Sanjay Sharma
asked
Apr 29, 2016
Programming in C
data-structures
+
–
1
votes
1
answer
1519
Facts about AVL tree
Which of the following is false? A. Maximum height of an AVL tree of n nodes is 1.44 log2n ​B. Insertion of an element into an AVL tree requires at most a double rotation C. Deletion of an element may require O(log n) rotation D. None of these
Which of the following is false?A. Maximum height of an AVL tree of n nodes is 1.44 log2n​B. Insertion of an element into an AVL tree requires at most a double rot...
GateAspirant999
1.5k
views
GateAspirant999
asked
Apr 26, 2016
DS
data-structures
avl-tree
+
–
10
votes
2
answers
1520
ISRO-2013-2
The number of rotations required to insert a sequence of elements $9, 6, 5, 8, 7, 10$ into an empty $AVL$ tree is? $0$ $1$ $2$ $3$
The number of rotations required to insert a sequence of elements $9, 6, 5, 8, 7, 10$ into an empty $AVL$ tree is?$0$$1$$2$$3$
makhdoom ghaya
8.5k
views
makhdoom ghaya
asked
Apr 25, 2016
DS
isro2013
data-structures
avl-tree
+
–
1
votes
1
answer
1521
Postorder traversal after creating AVL tree
The tree given is as follows: 30 / \ 12 45 \ 18 Insert: 10,15,40,20,22 Which one of the following is the postorder traversal of the resultant tree? (A) 10,15,13,20,22,30,45,40,18 (B) 10,15,12,20,30,22,45,40,18 (C) 10,15,12,20,30,22,45,18,40 (D) None of these
The tree given is as follows: 30 / \ 12 45 \ 18 Insert: 10,15,40,20,22Which one of the following is the postorder tr...
GateAspirant999
5.2k
views
GateAspirant999
asked
Apr 23, 2016
DS
data-structures
avl-tree
binary-search-tree
+
–
24
votes
3
answers
1522
GATE CSE 2009 | Question: 60
Consider a binary max-heap implemented using an array. What is the content of the array after two delete operations on $\left\{25,14,16,13,10,8,12\right\}$ $\left\{14,13,12,10, 8\right\}$ $\left\{14,12,13,8,10\right\}$ $\left\{14,13,8,12,10\right\}$ $\left\{14,13,12,8,10\right\}$
Consider a binary max-heap implemented using an array.What is the content of the array after two delete operations on $\left\{25,14,16,13,10,8,12\right\}$$\left\{14,13,12...
go_editor
8.8k
views
go_editor
asked
Apr 23, 2016
DS
gatecse-2009
data-structures
binary-heap
normal
+
–
1
votes
4
answers
1523
AVL Tree insertion
The tree given is as follows: 40 / \ 35 53 / \ 20 60 How many rotations are required for insertion of elements 30,55,45,65,42 in above tree. (A) 2 (B) 3 (C) 4 (D) None of these
The tree given is as follows: 40 / \ 35 53 / \ 20 60 How many rotations are required for insertion of elements 30,55,45,6...
GateAspirant999
3.8k
views
GateAspirant999
asked
Apr 23, 2016
DS
data-structures
avl-tree
+
–
73
votes
10
answers
1524
GATE CSE 2010 | Question: 53
A hash table of length $10$ uses open addressing with hash function $h(k) = k \: \mod \: 10$, and linear probing. After inserting $6$ ... of the key values using the same hash function and linear probing will result in the hash table shown above? $10$ $20$ $30$ $40$
A hash table of length $10$ uses open addressing with hash function $h(k) = k \: \mod \: 10$, and linear probing. After inserting $6$ values into an empty hash table, the...
go_editor
27.3k
views
go_editor
asked
Apr 21, 2016
DS
data-structures
hashing
normal
gatecse-2010
+
–
35
votes
4
answers
1525
GATE CSE 2013 | Question: 51
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $A$. The characters to be replaced are supplied in array $oldc$, while their respective replacement characters are supplied in array $newc$. ... will be successful in exposing the flaw in this procedure? None $2$ only $3$ and $4$ only $4$ only
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $A$. The characters to be replaced are sup...
go_editor
5.3k
views
go_editor
asked
Apr 21, 2016
DS
gatecse-2013
data-structures
array
normal
+
–
31
votes
2
answers
1526
GATE CSE 1991 | Question: 14,c
Consider the binary tree in the figure below: Outline a procedure in Pseudo-code to delete an arbitrary node from such a binary tree with $n$ nodes that preserves the structures. What is the worst-case time complexity of your procedure?
Consider the binary tree in the figure below:Outline a procedure in Pseudo-code to delete an arbitrary node from such a binary tree with $n$ nodes that preserves the stru...
Akash Kanase
3.0k
views
Akash Kanase
asked
Apr 18, 2016
DS
gate1991
normal
data-structures
binary-tree
time-complexity
descriptive
+
–
20
votes
3
answers
1527
GATE CSE 1991 | Question: 14,b
Consider the binary tree in the figure below: Give different steps for deleting the node with key $5$ so that the structure is preserved.
Consider the binary tree in the figure below:Give different steps for deleting the node with key $5$ so that the structure is preserved.
Akash Kanase
3.6k
views
Akash Kanase
asked
Apr 18, 2016
DS
gate1991
data-structures
binary-tree
normal
descriptive
+
–
0
votes
3
answers
1528
#DS Which Data structure is more suitable
Consider a situation where a client receives packets from a server. There may be differences in speed of the client and the server. Which data structure is best suited for synchronization? (A) Circular Linked List (B) Queue (C) Stack (D) Priority Queue
Consider a situation where a client receives packets from a server. There may be differences in speed of the client and the server. Which data structure is best suited fo...
Desert_Warrior
5.3k
views
Desert_Warrior
asked
Apr 11, 2016
DS
data-structures
+
–
0
votes
0
answers
1529
CLRS 8-2 Sorting in place in linear time
Suppose that we have an array of nn data records and that the key of each record has the value 0 or 1. An algorithm for sorting such a set of records might posses some subset of the following three desirable characteristics: The algorithm runs ... algorithm stable? (Hint: How would you do it for k=3? ) Can somebody please provide solution with an example?
Suppose that we have an array of nn data records and that the key of each record has the value 0 or 1. An algorithm for sorting such a set of records might posses some su...
HvnCool
866
views
HvnCool
asked
Mar 22, 2016
Algorithms
sorting
data-structures
+
–
0
votes
1
answer
1530
sparse matrix
How many real links are required to store a sparse matrix of 10 rows , 10 columns ,and 15 non zeros entries.(pick up the closest answer)
How many real links are required to store a sparse matrix of 10 rows , 10 columns ,and 15 non zeros entries.(pick up the closest answer)
neha singh
2.7k
views
neha singh
asked
Mar 11, 2016
DS
data-structures
sparse-matrix
matrix
+
–
Page:
« prev
1
...
46
47
48
49
50
51
52
53
54
55
56
...
60
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register