# Tag Archives: Data Structures

Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can weâ€¦ Read More
Consider the following pseudo code. Assume that IntQueue is an integer queue. What does the function fun do? void fun(int n) {     IntQueue q =â€¦ Read More
Is it possible to create a doubly linked list using only one pointer with every node. (A) Not Possible (B) Yes, possible by storing XORâ€¦ Read More
What are the time complexities of finding 8th element from beginning and 8th element from end in a singly linked list? Let n be theâ€¦ Read More
Given two max heaps of size n each, what is the minimum possible time complexity to make a one max-heap of size from elements ofâ€¦ Read More
Which of the following data structures is best suited for efficient implementation of priority queue? (A) Array (B) Linked List (C) Heap (D) Stack Answer:â€¦ Read More
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â€¦ Read More
Which data structure is best suited for converting recursive implementation to iterative implementation of an algorithm? (A) Queue (B) Stack (C) Tree (D) Graph Answer:â€¦ Read More
Given an undirected graph G with V vertices and E edges, the sum of the degrees of all vertices is (A) E (B) 2E (C)â€¦ Read More
Consider a node X in a Binary Tree. Given that X has two children, let Y be Inorder successor of X. Which of the followingâ€¦ Read More
Which of the following is FALSE about B/B+ tree (A) B/B+ trees grow upward while Binary Search Trees grow downward. (B) Time complexity of searchâ€¦ Read More
Consider the same code as given in above question. What does the function print() do in general? The function print() receives root of a Binaryâ€¦ Read More
Consider the following code snippet in C. The function print() receives root of a Binary Search Tree (BST) and a positive integer k as arguments.â€¦ Read More
Which among the following data structures is best suited for storing very large numbers (numbers that cannot be stored in long long int). Following areâ€¦ Read More
Which of the following traversals is sufficient to construct BST from given traversals 1) Inorder 2) Preorder 3) Postorder (A) Any one of the givenâ€¦ Read More