Topics

All Data Structures questions

  1. GATE CS 2026 Set 1MSQ1 markEasy (estimate)

    GATE CS 2026 Set 1, Q.23

    Let be an odd number greater than . Consider a binary minheap with elements stored in an array whose index starts from . Which of the following indices of…

    Binary Heaps and Priority Queues

  2. GATE CS 2026 Set 1MSQ1 markEasy (estimate)

    GATE CS 2026 Set 1, Q.24

    Consider a hash table that is initially empty. The hash table is maintained using open addressing with linear probing. The hash function used is…

    Hash Tables and Collision Resolution

  3. GATE CS 2026 Set 1NAT1 markEasy (estimate)

    GATE CS 2026 Set 1, Q.33

    The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 23 nodes is __...

    Binary Trees, Binary Search Trees and Balanced Trees

  4. GATE CS 2026 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2026 Set 1, Q.39

    Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer variable head. struct node{ int...

    Arrays and Linked Lists

  5. GATE CS 2026 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2026 Set 1, Q.40

    Let be the set of all integers from to . Consider any order of insertion of the elements of into a binary search tree that creates a complete binary tree. Which...

    Binary Trees, Binary Search Trees and Balanced Trees

  6. GATE CS 2026 Set 1NAT2 marksMedium (estimate)

    GATE CS 2026 Set 1, Q.62

    The following sequence corresponds to the preorder traversal of a binary search tree : The position of the element in the...

    Binary Trees, Binary Search Trees and Balanced Trees

  7. GATE CS 2026 Set 2MCQ1 markEasy (estimate)

    GATE CS 2026 Set 2, Q.12

    The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. T S I: Inorder L: left subtree, node, right subtre...

    Binary Trees, Binary Search Trees and Balanced Trees

  8. GATE CS 2026 Set 2NAT1 markEasy (estimate)

    GATE CS 2026 Set 2, Q.30

    The keys 5, 28, 19, 15, 26, 33, 12, 17, 10 are inserted into a hash table using the hash function . The collisions are resolved by chaining. After all the keys...

    Hash Tables and Collision Resolution

  9. GATE CS 2026 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2026 Set 2, Q.49

    Consider a binary search tree (BST) with leaf nodes (). Given any node , the key present in the node is denoted as . All the keys present in the given BST...

    Binary Trees, Binary Search Trees and Balanced Trees

  10. GATE CS 2026 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2026 Set 2, Q.50

    Consider a stack and a queue . Both of them are initially empty and have the capacity to store ten elements each. The elements 1, 2, 3, 4, and 5 arrive one by one, in tha...

    Stacks and Queues

  11. GATE CS 2025 Set 1MSQ1 markEasy (estimate)

    GATE CS 2025 Set 1, Q.26

    Which of the following statement(s) is/are TRUE for any binary search tree (BST) having distinct integers?

    Binary Trees, Binary Search Trees and Balanced Trees

  12. GATE CS 2025 Set 1NAT1 markEasy (estimate)

    GATE CS 2025 Set 1, Q.35

    The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap stores 32 keys. The height of ...

    Binary Heaps and Priority Queues

  13. GATE CS 2025 Set 1NAT2 marksMedium (estimate)

    GATE CS 2025 Set 1, Q.62

    Let LIST be a datatype for an implementation of linked list defined as follows: typedef struct list { int data; struct list *next; } LIST; Suppose a program has created two li...

    Arrays and Linked Lists

  14. GATE CS 2025 Set 1NAT2 marksMedium (estimate)

    GATE CS 2025 Set 1, Q.65

    In a double hashing scheme, and are the auxiliary hash functions. The size of the hash table is . The hash function for...

    Hash Tables and Collision Resolution

  15. GATE CS 2025 Set 2MCQ1 markEasy (estimate)

    GATE CS 2025 Set 2, Q.13

    Consider a binary tree in which every node has either zero or two children. Let be the number of nodes in . Which ONE of the following is the number of nodes in…

    Binary Trees, Binary Search Trees and Balanced Trees

  16. GATE CS 2025 Set 2NAT1 markEasy (estimate)

    GATE CS 2025 Set 2, Q.35

    Suppose the values are inserted in that order into an initially empty binary search tree. Let be the resulting binary search tree. The number...

    Binary Trees, Binary Search Trees and Balanced Trees

  17. GATE CS 2025 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2025 Set 2, Q.38

    A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures: P: Unsorted doub...

    Arrays and Linked Lists · Binary Heaps and Priority Queues · Binary Trees, Binary Search Trees and Balanced Trees

  18. GATE CS 2025 Set 2MSQ2 marksEasy (estimate)

    GATE CS 2025 Set 2, Q.45

    Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and that all keys are distinct. We...

    Stacks and Queues

  19. GATE CS 2024 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2024 Set 1, Q.41

    An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?

    Binary Heaps and Priority Queues

  20. GATE CS 2024 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2024 Set 1, Q.43

    Consider a binary min-heap containing 105 distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible val...

    Binary Heaps and Priority Queues

  21. GATE CS 2024 Set 2MCQ2 marksEasy (estimate)

    GATE CS 2024 Set 2, Q.39

    You are given a set of distinct integers. A binary search tree is created by inserting all elements of one by one, starting with an empty tree. The tree follows...

    Binary Trees, Binary Search Trees and Balanced Trees

  22. GATE CS 2024 Set 2MSQ2 marksMedium (estimate)

    GATE CS 2024 Set 2, Q.48

    Let S1 and S2 be two stacks. S1 has capacity of 4 elements. S2 has capacity of 2 elements. S1 already has 4 elements: 100, 200, 300, and 400, whereas S2 is empty, as...

    Stacks and Queues

  23. GATE CS 2023MCQ1 markEasy (estimate)

    GATE CS 2023, Q.12

    Which one of the following sequences when stored in an array at locations forms a max-heap?

    Binary Heaps and Priority Queues

  24. GATE CS 2023MCQ1 markEasy (estimate)

    GATE CS 2023, Q.13

    Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be a function that...

    Arrays and Linked Lists

  25. GATE CS 2023MCQ1 markEasy (estimate)

    GATE CS 2023, Q.20

    An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let be the numbe...

    Hash Tables and Collision Resolution

  26. GATE CS 2023MCQ2 marksEasy (estimate)

    GATE CS 2023, Q.46

    Let be a priority queue for maintaining a set of elements. Suppose is implemented using a max-heap data structure. The operation Extract-Max(A) extracts and deletes the...

    Binary Heaps and Priority Queues

  27. GATE CS 2023MCQ2 marksEasy (estimate)

    GATE CS 2023, Q.47

    Consider the C function foo and the binary tree shown. Binary tree with root 10, left child 5 (with left child 3 and right child 8), and right child 11 (with right child 13). ty...

    Binary Trees, Binary Search Trees and Balanced Trees · Functions, Recursion, Scope and Storage Classes

  28. GATE CS 2023NAT2 marksEasy (estimate)

    GATE CS 2023, Q.59

    Consider a sequence of elements , and . The following operations are performed on a stack and a queue , both of...

    Stacks and Queues

  29. GATE CS 2022MCQ1 markEasy (estimate)

    GATE CS 2022, Q.15

    Consider the problem of reversing a singly linked list. To take an example, given the linked list below, Singly linked list starting at head with nodes a, b, c, d, e followed by...

    Arrays and Linked Lists

  30. GATE CS 2022MCQ1 markEasy (estimate)

    GATE CS 2022, Q.16

    Suppose we are given keys, hash table slots, and two simple uniform hash functions and . Further suppose our hashing scheme uses for the odd keys and…

    Hash Tables and Collision Resolution

  31. GATE CS 2022NAT1 markHard (estimate)

    GATE CS 2022, Q.28

    Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that th...

    Binary Trees, Binary Search Trees and Balanced Trees

  32. GATE CS 2022NAT2 marksHard (estimate)

    GATE CS 2022, Q.62

    Consider the queues Q1 containing four elements and Q2 containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue(Q,...

    Stacks and Queues

  33. GATE CS 2021 Set 1MCQ1 markMedium (estimate)

    GATE CS 2021 Set 1, Q.20 (CS Q.10)

    A binary search tree contains distinct elements. What is the time complexity of picking an element in that is smaller than the maximum element in ?

    Binary Trees, Binary Search Trees and Balanced Trees

  34. GATE CS 2021 Set 1NAT1 markEasy (estimate)

    GATE CS 2021 Set 1, Q.31 (CS Q.21)

    Consider the following sequence of operations on an empty stack. push(54); push(52); pop(); push(55); push(62); s = pop(); Consider the following sequence of operations on an...

    Stacks and Queues

  35. GATE CS 2021 Set 2MCQ1 markEasy (estimate)

    GATE CS 2021 Set 2, Q.12 (CS Q.2)

    Let be a binary min-heap consisting of elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in ?

    Binary Heaps and Priority Queues

  36. GATE CS 2021 Set 2NAT1 markEasy (estimate)

    GATE CS 2021 Set 2, Q.26 (CS Q.16)

    Consider a complete binary tree with 7 nodes. Let denote the set of first 3 elements obtained by performing Breadth-First Search (BFS) starting from the root. Let denote...

    Binary Trees, Binary Search Trees and Balanced Trees

  37. GATE CS 2020MCQ1 markEasy (estimate)

    GATE CS 2020, Q.15 (CS Q.5)

    The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?

    Binary Trees, Binary Search Trees and Balanced Trees

  38. GATE CS 2020MCQ1 markMedium (estimate)

    GATE CS 2020, Q.16 (CS Q.6)

    What is the worst case time complexity of inserting elements into an AVL-tree with elements initially?

    Binary Trees, Binary Search Trees and Balanced Trees · Asymptotic Analysis and Time/Space Complexity

  39. GATE CS 2020MCQ1 markEasy (estimate)

    GATE CS 2020, Q.26 (CS Q.16)

    What is the worst case time complexity of inserting elements into an empty linked list, if the linked list needs to be maintained in sorted order?

    Arrays and Linked Lists · Asymptotic Analysis and Time/Space Complexity

  40. GATE CS 2020NAT1 markEasy (estimate)

    GATE CS 2020, Q.33 (CS Q.23)

    Consider a double hashing scheme in which the primary hash function is , and the secondary hash function is . Assume that the tab...

    Hash Tables and Collision Resolution

  41. GATE CS 2020MCQ2 marksEasy (estimate)

    GATE CS 2020, Q.51 (CS Q.41)

    In a balanced binary search tree with elements, what is the worst case time complexity of reporting all elements in range ? Assume that the number of reported elemen...

    Binary Trees, Binary Search Trees and Balanced Trees · Asymptotic Analysis and Time/Space Complexity

  42. GATE CS 2020NAT2 marksMedium (estimate)

    GATE CS 2020, Q.57 (CS Q.47)

    Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _______.

    Binary Heaps and Priority Queues

  43. GATE CS 2019MCQ2 marksMedium (estimate)

    GATE CS 2019, Q.50 (CS Q.40)

    Consider the following statements: I. The smallest element in a max-heap is always at a leaf node II. The second largest element in a max-heap is always a child of the root node...

    Binary Heaps and Priority Queues

  44. GATE CS 2019NAT2 marksMedium (estimate)

    GATE CS 2019, Q.56 (CS Q.46)

    Let be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves and of are chosen uniformly and independently at random. T...

    Binary Trees, Binary Search Trees and Balanced Trees

  45. GATE CS 2018MCQ1 markEasy (estimate)

    GATE CS 2018, Q.13 (CS Q.3)

    A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let n denote the number of nodes in the...

    Stacks and Queues

  46. GATE CS 2018NAT1 markEasy (estimate)

    GATE CS 2018, Q.30 (CS Q.20)

    The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same tree is 8,6,9,4,7,2,5,1,3. The height of a tree is the length of the longest pat...

    Binary Trees, Binary Search Trees and Balanced Trees

  47. GATE CS 2018NAT2 marksMedium (estimate)

    GATE CS 2018, Q.56 (CS Q.46)

    The number of possible min-heaps containing each value from exactly once is _____.

    Binary Heaps and Priority Queues

  48. GATE CS 2017 Set 1MCQ1 markEasy (estimate)

    GATE CS 2017 Set 1, Q.6 (CS Q.6)

    Let be a binary search tree with 15 nodes. The minimum and maximum possible heights of are: Note: The height of a tree with a single node is 0.

    Binary Trees, Binary Search Trees and Balanced Trees

  49. GATE CS 2017 Set 2MCQ1 markEasy (estimate)

    GATE CS 2017 Set 2, Q.13 (CS Q.13)

    A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two exte...

    Stacks and Queues · Arrays and Linked Lists

  50. GATE CS 2017 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2017 Set 2, Q.36 (CS Q.36)

    The pre-order traversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is:

    Binary Trees, Binary Search Trees and Balanced Trees

  51. GATE CS 2016 Set 1MCQ1 markEasy (estimate)

    GATE CS 2016 Set 1, Q.20 (CS Q.10)

    A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT ( refers to the num...

    Stacks and Queues

  52. GATE CS 2016 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2016 Set 1, Q.47 (CS Q.37)

    An operator delete(i) for a binary heap data structure is to be designed to delete the item in the -th node. Assume that the heap is implemented in an array and refers...

    Binary Heaps and Priority Queues

  53. GATE CS 2016 Set 1NAT2 marksMedium (estimate)

    GATE CS 2016 Set 1, Q.51 (CS Q.41)

    Let denote a queue containing sixteen numbers and be an empty stack. returns the element at the head of the queue without removing it from . Simi...

    Stacks and Queues

  54. GATE CS 2016 Set 2MCQ1 markMedium (estimate)

    GATE CS 2016 Set 2, Q.25 (CS Q.15)

    items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provid...

    Arrays and Linked Lists

  55. GATE CS 2016 Set 2NAT2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.44 (CS Q.34)

    A complete binary min-heap is made by including each integer in exactly once. The depth of a node in the heap is the length of the path from the root of the heap to...

    Binary Heaps and Priority Queues

  56. GATE CS 2016 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.46 (CS Q.36)

    Consider the following New-order strategy for traversing a binary tree: - Visit the root; - Visit the right subtree using New-order; - Visit the left subtree using New-order; Th...

    Binary Trees, Binary Search Trees and Balanced Trees

  57. GATE CS 2016 Set 2NAT2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.50 (CS Q.40)

    The number of ways in which the numbers 1, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such that the resulting tree has height 6, is ________. Note: The hei...

    Binary Trees, Binary Search Trees and Balanced Trees

  58. GATE CS 2016 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.51 (CS Q.41)

    In an adjacency list representation of an undirected simple graph , each edge has two adjacency list entries: in the adjacency list of , and ...

    Graph Representations and Disjoint Sets · Asymptotic Analysis and Time/Space Complexity

  59. GATE CS 2015 Set 1MCQ1 markEasy (estimate)

    GATE CS 2015 Set 1, Q.20 (CS Q.10)

    Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)? I. II. III.…

    Binary Trees, Binary Search Trees and Balanced Trees

  60. GATE CS 2015 Set 1MCQ1 markEasy (estimate)

    GATE CS 2015 Set 1, Q.33 (CS Q.23)

    What are the worst-case complexities of insertion and deletion of a key in a binary search tree?

    Binary Trees, Binary Search Trees and Balanced Trees

  61. GATE CS 2015 Set 1MCQ1 markEasy (estimate)

    GATE CS 2015 Set 1, Q.35 (CS Q.25)

    The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height are:

    Binary Trees, Binary Search Trees and Balanced Trees

  62. GATE CS 2015 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2015 Set 1, Q.42 (CS Q.32)

    Consider a max heap, represented by the array: | Array Index | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---...

    Binary Heaps and Priority Queues

  63. GATE CS 2015 Set 1MCQ2 marksHard (estimate)

    GATE CS 2015 Set 1, Q.50 (CS Q.40)

    An algorithm performs find operations, insert operations, delete operations, and decrease-key operations on a set of data...

    Arrays and Linked Lists

  64. GATE CS 2015 Set 2NAT1 markEasy (estimate)

    GATE CS 2015 Set 2, Q.20 (CS Q.10)

    A binary tree has 20 leaves. The number of nodes in having two children is _____.

    Binary Trees, Binary Search Trees and Balanced Trees

  65. GATE CS 2015 Set 2MCQ1 markMedium (estimate)

    GATE CS 2015 Set 2, Q.27 (CS Q.17)

    Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is

    Binary Heaps and Priority Queues

  66. GATE CS 2015 Set 2NAT2 marksMedium (estimate)

    GATE CS 2015 Set 2, Q.41 (CS Q.31)

    A Young tableau is a 2D array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with , and hence there cannot be any entr...

    Arrays and Linked Lists

  67. GATE CS 2015 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2015 Set 2, Q.43 (CS Q.33)

    Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for ranging from 0 to 2020?

    Hash Tables and Collision Resolution

  68. GATE CS 2015 Set 3MCQ1 markEasy (estimate)

    GATE CS 2015 Set 3, Q.22 (CS Q.12)

    The result evaluating the postfix expression is

    Stacks and Queues

  69. GATE CS 2015 Set 3MCQ1 markEasy (estimate)

    GATE CS 2015 Set 3, Q.23 (CS Q.13)

    While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is

    Binary Trees, Binary Search Trees and Balanced Trees

  70. GATE CS 2015 Set 3NAT1 markEasy (estimate)

    GATE CS 2015 Set 3, Q.27 (CS Q.17)

    Given a hash table with 25 slots that stores 2000 elements, the load factor for is _____.

    Hash Tables and Collision Resolution

  71. GATE CS 2015 Set 3MCQ1 markMedium (estimate)

    GATE CS 2015 Set 3, Q.29 (CS Q.19)

    Consider the following array of elements The minimum number of interchanges needed to convert it into a max-he...

    Binary Heaps and Priority Queues

  72. GATE CS 2015 Set 3NAT1 markEasy (estimate)

    GATE CS 2015 Set 3, Q.35 (CS Q.25)

    Consider a binary tree that has 200 leaf nodes. Then, the number of nodes in that have exactly two children are _____.

    Binary Trees, Binary Search Trees and Balanced Trees

  73. GATE CS 2014 Set 1NAT1 markMedium (estimate)

    GATE CS 2014 Set 1, Q.22 (CS Q.12)

    Consider a rooted node binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having exactly 4 nodes is…

    Binary Trees, Binary Search Trees and Balanced Trees

  74. GATE CS 2014 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2014 Set 1, Q.50 (CS Q.40)

    Consider a hash table with 9 slots. The hash function is . The collisions are resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19,...

    Hash Tables and Collision Resolution

  75. GATE CS 2014 Set 2MCQ1 markEasy (estimate)

    GATE CS 2014 Set 2, Q.22 (CS Q.12)

    A priority queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is: 10, 8, 5, 3, 2. Two new elements 1 and 7 are inserted into...

    Binary Heaps and Priority Queues

  76. GATE CS 2014 Set 2NAT2 marksMedium (estimate)

    GATE CS 2014 Set 2, Q.49 (CS Q.39)

    Consider the expression tree shown. Each leaf represents a numerical value, which can either be 0 or 1. Over all possible choices of the values at the leaves, the maximum possib...

    Binary Trees, Binary Search Trees and Balanced Trees

  77. GATE CS 2014 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2014 Set 2, Q.51 (CS Q.41)

    Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the...

    Stacks and Queues

  78. GATE CS 2014 Set 3MCQ1 markMedium (estimate)

    GATE CS 2014 Set 3, Q.22 (CS Q.12)

    Consider the following rooted tree with the vertex labeled P as the root: Rooted tree with root P having left child Q and right child R; Q has child S; R has three children T, U...

    Binary Trees, Binary Search Trees and Balanced Trees

  79. GATE CS 2014 Set 3NAT2 marksMedium (estimate)

    GATE CS 2014 Set 3, Q.49 (CS Q.39)

    Suppose we have a balanced binary search tree holding numbers. We are given two numbers and and wish to sum up all the numbers in that lie between and…

    Binary Trees, Binary Search Trees and Balanced Trees

  80. GATE CS 2014 Set 3MCQ2 marksEasy (estimate)

    GATE CS 2014 Set 3, Q.50 (CS Q.40)

    Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first 3 slots are unfilled after...

    Hash Tables and Collision Resolution

  81. GATE CS 2014 Set 3MCQ2 marksMedium (estimate)

    GATE CS 2014 Set 3, Q.51 (CS Q.41)

    Consider the pseudocode given below. The function DoSomething() takes as argument a pointer to the root of an arbitrary tree represented by the leftMostChild-rightSibling repres...

    Binary Trees, Binary Search Trees and Balanced Trees

  82. GATE CS 2013MCQ1 markEasy (estimate)

    GATE CS 2013, Q.7 (CS Q.7)

    Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of nodes?

    Binary Trees, Binary Search Trees and Balanced Trees

  83. GATE CS 2013MCQ2 marksEasy (estimate)

    GATE CS 2013, Q.43 (CS Q.43)

    The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?

    Binary Trees, Binary Search Trees and Balanced Trees

  84. GATE CS 2013MCQ2 marksMedium (estimate)

    GATE CS 2013, Q.44 (CS Q.44)

    Consider the following operation along with Enqueue and Dequeue operations on queues, where is a global parameter. MultiDequeue(Q){ m = k while (Q is not empty) and...

    Stacks and Queues

  85. GATE CS 2012MCQ1 markEasy (estimate)

    GATE CS 2012, Q.5 (CS Q.5)

    The worst case running time to search for an element in a balanced binary search tree with elements is

    Binary Trees, Binary Search Trees and Balanced Trees

  86. GATE CS 2012MCQ2 marksEasy (estimate)

    GATE CS 2012, Q.35 (CS Q.35)

    Suppose a circular queue of capacity () elements is implemented with an array of elements. Assume that the insertion and deletion operations are carried out using REA...

    Stacks and Queues

  87. GATE CS 2012MCQ2 marksEasy (estimate)

    GATE CS 2012, Q.47 (CS Q.47)

    The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height(root) to compute the he...

    Binary Trees, Binary Search Trees and Balanced Trees · Binary Trees, Binary Search Trees and Balanced Trees

  88. GATE CS 2011MCQ1 markEasy (estimate)

    GATE CS 2011, Q.23 (CS Q.23)

    A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?

    Binary Trees, Binary Search Trees and Balanced Trees

  89. GATE CS 2011MCQ2 marksEasy (estimate)

    GATE CS 2011, Q.29 (CS Q.29)

    We are given a set of distinct elements and an unlabeled binary tree with nodes. In how many ways can we populate the tree with the given set so that it becomes a binary...

    Binary Trees, Binary Search Trees and Balanced Trees