Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew

Search questions

78 questions
  1. GATE CSE 2026 Set 1, Q29, MCQ, Data structuresConsider 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.…
  2. GATE CSE 2026 Set 2, Q2, MCQ, Data structuresThe set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal.…
  3. GATE CSE 2026 Set 2, Q40, MSQ, Data structuresConsider a stack S and a queue Q. 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…
  4. GATE CSE 2025 Set 1, Q16, MSQ, Data structuresWhich of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?
  5. GATE CSE 2025 Set 1, Q23, NAT, Data structuresThe pseudocode of a function fun () is given below: [code] Let…
  6. GATE CSE 2025 Set 1, Q25, NAT, Data structuresThe 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 T stores 32 keys.…
  7. GATE CSE 2025 Set 1, Q52, NAT, Data structuresLet LIST be a datatype for an implementation of linked list defined as follows: [code] Suppose a program has created two linked lists, L1…
  8. GATE CSE 2025 Set 2, Q3, MCQ, Data structuresConsider a binary tree T in which every node has either zero or two children. Let n>0 be the number of nodes in T. Which ONE of the following is the number of…
  9. GATE CSE 2025 Set 2, Q25, NAT, Data structuresSuppose the values 10,-4,15,30,20,5,60,19 are inserted in that order into an initially empty binary search tree. Let T be the resulting binary search tree. The…
  10. GATE CSE 2025 Set 2, Q28, MCQ, Data structuresA 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:…
  11. GATE CSE 2025 Set 2, Q35, MSQ, Data structuresConsider 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…
  12. GATE CSE 2024 Set 1, Q33, MCQ, Data structuresConsider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number…
  13. GATE CSE 2024 Set 2, Q38, MSQ, Data structuresLet S 1 and S 2 be two stacks. S 1 has capacity of 4 elements. S 2 has capacity of 2 elements. S1 already has 4 elements: 100,200,300, and 400, whereas…
  14. GATE CSE 2023, Q2, MCQ, Data structuresWhich one of the following sequences when stored in an array at locations A[1], …, A[10] forms a max-heap?
  15. GATE CSE 2023, Q3, MCQ, Data structuresLet 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…
  16. GATE CSE 2023, Q36, MCQ, Data structuresLet A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation EXTRACT-MAX (A) extracts…
  17. GATE CSE 2023, Q37, MCQ, Data structuresConsider the C function foo and the binary tree shown. [code]…
  18. GATE CSE 2023, Q49, NAT, Data structuresConsider a sequence a of elements a_0=1, a_1=5, a_2=7, a_3=8, a_4=9, and a_5=2. The following operations are performed on a stack S and a queue Q, both of which…
  19. GATE CSE 2022, Q5, MCQ, Data structuresConsider the problem of reversing a singly linked list. To take an example, given the linked list below, [figure] the reversed linked list should look like…
  20. GATE CSE 2022, Q18, NAT, Data structuresSuppose 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.…