Data Structures GTU Exam Prep
Shared by a Veda learner · Generated with Veda AI
What you'll study, topic by topic
Data Structures GTU Exam Prep
This is a GTU BE Semester-III Data Structures exam. The paper covers fundamental data structures: stacks, queues, linked lists, trees (BST, AVL, 2-3, threaded), graphs (BFS, DFS, MST, shortest path), hashing, sorting, an...
Sample questions with model answers
Every question in the paper gets a full exam-length answer in the app — organised by marks, the way a topper writes it.
Write an algorithm for the following stack operations: 1) PUSH 2) POP 3) DISPLAY
Show answer outline
PUSH: if top < MAX-1, increment top and set stack[top]=item; POP: if top >= 0, return stack[top] and decrement top; DISPLAY: iterate from top down to 0 and print each element.
The full exam-length answer is in the app.
Write an algorithm for the following queue operations: 1) INSERT 2) DELETE 3) DISPLAY
Show answer outline
INSERT: if rear < MAX-1, increment rear and set queue[rear]=item; DELETE: if front
The full exam-length answer is in the app.
Construct the minimum spanning tree using prim’s algorithm for the following graph.
Show answer outline
Start from an arbitrary node, repeatedly add the minimum weight edge that connects a visited node to an unvisited node, until all nodes are visited.
The full exam-length answer is in the app.
Construct the minimum spanning tree using krushkal’s algorithm for the following graph.
Show answer outline
Sort all edges by weight, then add the smallest edge that doesn't form a cycle, until all vertices are connected.
The full exam-length answer is in the app.
More free kits
Study it properly — free, in the app
The full Veda Bites deck, complete notes, spaced-repetition flashcards, leveled MCQs, tests and games for this kit — plus Daily Facts and the Arena, every day.