Enrollment No./Seat No.:

## GUJARAT TECHNOLOGICAL UNIVERSITY

## DIPLOMA IN ENGINEERING - SEMESTER - III EXAMINATION - SUMMER 2026

Subject Code: DI03000021

Date: 14-05-2026

Subject Name: Data Structures

Time: 02:30 PM TO 05:00 PM

Instructions:

1. Attempt all questions.

2. Make Suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Use of simple calculators and non-programmable scientific calculators are permitted.

5. English version is authentic.

|     |       |                                                                                                                                                                                                                                       | Marks   |
|-----|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| Q.1 | (a)   | Define Algorithm. List out characteristics of algorithm.                                                                                                                                                                              | 03      |
|     | ( અ ) | Algorithm  ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા લખો.  Algorithm  ના  characteristics  લખો.                                                                                                  | ૦૩      |
|     | (b)   | Explain Primitive and non-primitive types of data structures.                                                                                                                                                                         | 04      |
|     | ( બ ) | GLYPH<c=15,font=/QXBAAA+Lohit-Gujarati>ીમીટીવ અને નોન - GLYPH<c=15,font=/QXBAAA+Lohit-Gujarati>ીમીટીવ GLYPH<c=15,font=/QXBAAA+Lohit-Gujarati>કારના  data structures  સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                | ૦૪      |
|     | (c)   | Explain Binary search method with suitable example. Write down Binary search algorithm for searching an element in array.                                                                                                             | 07      |
|     | ( ક ) | બાઇનરી સચGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati> મેથડ યોGLYPH<c=30,font=/QXBAAA+Lohit-Gujarati>ય ઉદાહરણ સાથે સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો. એરે માંથી એિલમે&ટ શોધવા માટે નો બાઇનરી સચGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati>  algorithm  લખો. | ૦૭      |
|     |       | OR                                                                                                                                                                                                                                    |         |
|     | (c)   | Define array. Explain row major and column major array with the help of an example.                                                                                                                                                   | 07      |
|     | ( ક ) | Array  ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો. ઉદાહરણની મદદથી રો મેજર અને કોલમ મેજર એરે સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                                              | ૦૭      |
| Q.2 | (a)   | Define Stack. Write an algorithm to push an element into the stack.                                                                                                                                                                   | 03      |
|     | ( અ ) | Stack  ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો.  Stack  માં  element push  કરાવવા માટે નો  algorithm  લખો.                                                                                       | ૦૩      |
|     | (b)   | Convert the following infix expression into postfix expression: A*(B+D)/E-F*(G+H/K)                                                                                                                                                   | 04      |
|     | ( બ ) | નીચેના  infix expression  ને  postfix expression  માં -પાાંતર કરો : A*(B+D)/E-F*(G+H/K)                                                                                                                                                         | ૦૪      |
|     | (c)   | Write applications of stack. Explain recursion with the help of an example.                                                                                                                                                           | 07      |
|     | ( ક ) | Stack  ની  applications  લખો.  Recursion  ને દાખલો આપી ને સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                                                                                                                        | ૦૭      |
|     |       | OR                                                                                                                                                                                                                                    |         |
|     | (a)   | Write an algorithm to delete an element from simple queue.                                                                                                                                                                            | 03      |
|     | ( અ ) | Simple queue  માંથી  element delete  કરાવવા માટે નો  algorithm  લખો.                                                                                                                                                                           | ૦૩      |
|     | (b)   | Differentiate between Simple Queue and Circular Queue.                                                                                                                                                                                | 04      |

Total Marks: 70

|     | ( બ )   | Simple Queue and Circular Queue  વ/ચે નો તફાવત લખો.                                                                                                                                                                                               | ૦૪   |
|-----|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|
|     | (c)     | Consider maximum size of stack is 5. Perform following operation on stack and show the status of stack and top pointer after each operation. PUSH A, PUSH B, PUSH C, PUSH D, POP, PUSH E, PUSH F, POP, POP, PUSH                              | 07   |
|     | ( ક )   | Stack  ની  maximum size 5  લેવી. 1ટેક પર નીચેની કામગ3રી કરો અને દરેક ઓપરેશન પછી 1ટેક અને ટોપ પોઇ&ટરની િ1ત6થ દશાાવો. PUSH A, PUSH B, PUSH C, PUSH D, POP, PUSH E, PUSH F, POP, POP, PUSH G.                                                                           | ૦૭   |
| Q.3 | (a)     | Define Linked list. Draw a singly linked list for given elements: 25, 10, 4, 20.                                                                                                                                                              | 03   |
|     | ( અ )   | Linked list  ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો. આપેલા ડે ટા માટે  Linked list  દોરો : 25, 10, 4, 20.                                                                                               | ૦૩   |
|     | (b)     | Give difference between singly linked list and doubly linked list.                                                                                                                                                                            | 04   |
|     | ( બ )   | Singly linked list and Doubly linked list  વ/ચે નો તફાવત લખો.                                                                                                                                                                                     | ૦૪   |
|     | (c)     | Develop an algorithm to insert a new node in sorted linked list.                                                                                                                                                                              | 07   |
|     | ( ક )   | Sorted linked list  માં નવો નોડ દાખલ કરવા માટે નો  algorithm  િવકસાવો.                                                                                                                                                                                    | ૦૭   |
|     | (a)     | List out applications of Linked List.                                                                                                                                                                                                         | 03   |
|     | ( અ )   | Linked List  ની  applications  લખો.                                                                                                                                                                                                             | ૦૩   |
|     | (b)     | Explain the concept of Circular linked list with example.                                                                                                                                                                                     | 04   |
|     | ( બ )   | Circular linked list  નો  concept  ઉદાહરણ આપી સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                                                                                                                                        | ૦૪   |
|     | (c)     | Develop an algorithm to insert a new node at the end of singly linked list.                                                                                                                                                                   | 07   |
|     | ( ક )   | Singly Linked list  ના અંત માં નવો નોડ દાખલ કરવા માટે નો  algorithm  િવકસાવો.                                                                                                                                                                               | ૦૭   |
| Q.4 | (a)     | Define following terms of Tree Data structure. i) Complete binary tree ii) Root node iii) out-degree                                                                                                                                          | 03   |
|     | ( અ )   | નીચેના ટ7 ી  Data structure  નાં ટ8સGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati> ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો : i)  પૂણGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati> બાઈનરી ટ7 ી  ii)  ;ટ નોડ  iii)  આઉટ િડ<ી | ૦૩   |
|     | (b)     | Explain various types of graphs.                                                                                                                                                                                                              | 04   |
|     | ( બ )   | <ાફ ના િવિવધ GLYPH<c=15,font=/QXBAAA+Lohit-Gujarati>કારો સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                                                                                                                                | ૦૪   |
|     | (c)     | Generate Binary Search tree for the following data: 45(root node),65,35,70,10,42,40,44,41,55                                                                                                                                                  | 07   |
|     |         | Write In-Order, Pre-Order, and Post-Order tree traversals for that given tree.                                                                                                                                                                |      |
|     | ( ક )   | આપેલા ડે ટા માટે  Binary search tree  બનાવો. 45(root node),65,35,70,10,42,40,44,41,55                                                                                                                                                                 | ૦૭   |

In-order, Pre-order, Post-order traversals

શોધો.

Q.5

| (a)   | Define following terms of Graph Data structure.  i) Vertex ii) Edge iii) Path                                                                                                                        |   03 |
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|
| ( અ ) | નીચેના <ાફ  Data structure  નાં ટ8સGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati> ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો : i) Vertex ii) Edge iii) Path             |   ૦૩ |
| (b)   | Explain inorder and preorder tree traversal with example.                                                                                                                                            |   04 |
| ( બ ) | ઈન ઓડGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati>ર અને GLYPH<c=15,font=/QXBAAA+Lohit-Gujarati>ી ઓડGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati>ર  traversal  ઉદાહરણ આપી સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો. |   ૦૪ |
| (c)   | Explain deletion of a node from binary search tree with an example.                                                                                                                                  |   07 |
| ( ક ) | બાઈનરી સચGLYPH<c=27,font=/QXBAAA+Lohit-Gujarati> ટ7 ી માંથી નોડ ડીલીટ કરવાનું ઉદાહરણ આપીને સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                                                              |   ૦૭ |
| (a)   | Define Sorting. List out various sorting techniques.                                                                                                                                                 |   03 |
| ( અ ) | Sorting  ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો.  Sorting techniques  ની યાદી બનાવો.                                                                        |   ૦૩ |
| (b)   | Explain radix sort with the help of example.                                                                                                                                                         |   04 |
| ( બ ) | ઉદાહરણ આપી  radix sort  સમGLYPH<c=23,font=/QXBAAA+Lohit-Gujarati>વો.                                                                                                                                    |   ૦૪ |
| (c)   | Give the trace of following numbers in ascending order using bubble sort. 65,32,57,43,99,11,23                                                                                                       |   07 |
| ( ક ) | Bubble sort  નો ઉપયોગ કરીને નીચેના નંબરો ને ચડતા >મમાં ટ7ે સ કરો. 65,32,57,43,99,11,23                                                                                                                              |   ૦૭ |
| (a)   | Define Hashing. List various hashing techniques.                                                                                                                                                     |   03 |
| ( અ ) | Hashing  ની GLYPH<c=4,font=/QXBAAA+Lohit-Gujarati> યાGLYPH<c=7,font=/QXBAAA+Lohit-Gujarati>યા આપો.  Hashing techniques  ની યાદી બનાવો.                                                                        |   ૦૩ |
| (b)   | Develop an algorithm for merge sort.                                                                                                                                                                 |   04 |
| ( બ ) | Merge sort  માટે નો  algorithm  િવકસાવો.                                                                                                                                                                   |   ૦૪ |
| (c)   | Give the trace of following numbers in ascending order using Selection sort. 15,10,45,30,25,20,35                                                                                                    |   07 |
| ( ક ) | Selection sort  નો ઉપયોગ કરીને નીચેના નંબરો ને ચડતા >મમાં ટ7ે સ કરો. 15,10,45,30,25,20,35                                                                                                                           |   ૦૭ |