# Tag Archives: Data Structures

## Data Structures | Tree Traversals | Question 11

Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal. Respectively, of a complete binary tree. Which of… Read More »

## Data Structures | Linked List | Question 12

A circularly linked list is used to represent a Queue. A single variable p is used to access the Queue. To which node should p… Read More »

## Data Structures | Misc | Question 5

A data structure is required for storing a set of integers such that each of the following operations can be done in (log n) time,… Read More »

## Data Structures | Binary Search Trees | Question 7

The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the… Read More »

## Data Structures | Linked List | Question 11

Consider the function f defined below. filter_none edit close play_arrow link brightness_4 code struct item  {    int data;    struct item * next;  };     int… Read More »

## Data Structures | Binary Trees | Question 13

Postorder traversal of a given binary search tree, T produces the following sequence of keys 10, 9, 23, 22, 27, 25, 15, 50, 95, 60,… Read More »

## Data Structures | Hash | Question 5

Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are… Read More »

## Data Structures | Misc | Question 4

The best data structure to check whether an arithmetic expression has balanced parentheses is a (GATE CS 2004) (A) queue (B) stack (C) tree (D)… Read More »

## Data Structures | Linked List | Question 10

Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality will be… Read More »

## Data Structures | Tree Traversals | Question 10

Consider the following C program segment filter_none edit close play_arrow link brightness_4 code struct CellNode {   struct CelINode *leftchild;   int element;   struct CelINode *rightChild; }… Read More »

## Data Structures | Stack | Question 8

A single array A[1..MAXSIZE] is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables top1 and top2 (topl<… Read More »

## Data Structures | Heap | Question 12

The elements 32, 15, 20, 30, 12, 25, 16 are inserted one by one in the given order into a Max Heap. The resultant Max… Read More »

## Data Structures | Linked List | Question 9

In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (GATE CS… Read More »

## Data Structures | Binary Trees | Question 12

A scheme for storing binary trees in an array X is as follows. Indexing of X starts at 1 instead of 0. the root is… Read More »

## Data Structures | Heap | Question 9

In a binary max heap containing n numbers, the smallest element can be found in time (GATE CS 2006) (A) 0(n) (B) O(logn) (C) 0(loglogn)… Read More »