CDS - QB - Unit3 4 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Data Structures Question Bank

S.
Question
No.
1 What is a data structure?
● A data structure is a method for organizing and storingdata which would allow
efficient
data retrieval and usage.
● A data structure is a way of organizing data that considersnot only the items stored,
but
also their relationships to each other.
2 Why do we need data structures?
● Data structures allow us to achieve an important goal:component reuse.
● Once data structure has been implemented, it can be usedagain and again in
various applications.
3 List some common data structures.
● Stacks
● Queues
● Lists
● Trees
● Graphs
● Tables

4 How data structures are classified?


Data structures are classified into two categories based onhow the data items are
operated:
i. Primitive data structure
ii. Non-Primitive data structure
a. Linear data structure
b. Non-linear data structure
5 Differentiate linear and non-linear data structure.

Linear data structure Non-linear data structure


Data are arranged in linear or Data are not arranged in linear
sequential manner manner

Every items is related to its Every item is attached with


previous many other
and next item items

Data items can be traversed in Data items cannot be traversed


a in a
single run. single run.

Implementation is easy Implementation is difficult.


Example: array, stack, queue, Example: tree, graph
linked
list
6 Define ADT (Abstract Data Type)
An abstract data type (ADT) is a set of operations and mathematical abstractions ,
which can be viewed as how the set of operations is implemented. Objects like lists, sets and
graphs, along with their operation, can be viewed as abstract data types, just as integers, real
numbersand Booleans.

7 Mention the features of ADT.


a. Modularity
i. Divide program into small functions
ii. Easy to debug and maintain
iii. Easy to modify
b. Reuse
i. Define some operations only once and reuse them in future
c. Easy to change the implementation

8 Define List ADT


A list is a sequence of zero or more elements of a giventype. The list is represented
as sequence of elements separated by comma.A1, A2, A3…..AN
Where N>0 and A is of type element
9 What are the ways of implementing linked list?
The list can be implemented in the following ways:
i. Array implementation
ii. Linked-list implementation
iii. Cursor implementation
10 What are the types of linked lists?
There are three types
i. Singly linked list
ii. Doubly linked list
iii. Circularly linked list
11 How the singly linked lists can be represented?

Each node has two elements


i. Data
ii. Next

12 How the doubly linked list can be represented?

Doubly linked list is a collection of nodes where nodes areconnected by


forwarded and
backward link.
Each node has three fields:
1. Address of previous node
2. Data
3. Address of next node.

13 What are benefits of ADT?


a. Code is easier to understand
b. Implementation of ADT can be changed without requiringchanges to the program
that uses the ADT
14 When singly linked list can be represented as circular linkedlist?
In a singly linked list, all the nodes are connected with forward links to the
next nodes in the list. The last node has a next field, NULL. In order to
implement the circularly linked
lists from singly linked lists, the last node’s next field isconnected to the first node.

15 When doubly linked list can be represented as circular linkedlist?


In a doubly linked list, all nodes are connected withforward and backward links to
the
next and previous nodes respectively. In order to implementcircular linked lists from
doubly linked lists, the first node’s previous field is connected tothe last node and the
last node’s next field is connected to the first node.

17 List down the applications of List.


a. Representation of polynomial ADT
b. Used in radix and bubble sorting
c. In a FAT file system, the metadata of a large file is organizedas a linked list of FAT
entries.
d. Simple memory allocators use a free list of unused memoryregions, basically a
linked list with the list pointer inside the free memory itself.
18 What are the advantages of linked list?
a. Save memory space and easy to maintain
b. It is possible to retrieve the element at a particular index
c. It is possible to traverse the list in the order of increasing index.
d. It is possible to change the element at a particular index to a
different value,without affecting any other elements.
19 Mention the demerits of linked list
a. It is not possible to go backwards through the list
b. Unable to jump to the beginning of list from the end.

20 The polynomial equation can be represented with linked listas follows:

Coefficient Exponent Next node link

struct polynomial
{
int coefficient;int exponent;struct polynomial *next;
};

21 What are the operations performed in list?


The following operations can be performed on a list
i. Insertion
a. Insert at beginning
b. Insert at end
c. Insert after specific node
d. Insert before specific node
ii. Deletion
a. Delete at beginning
b. Delete at end
c. Delete after specific node
d. Delete before specific node
iii. Merging
iv. Traversal

22 What are the merits and demerits of array implementation oflists?


Merits
● Fast, random access of elements
● Memory efficient – very less amount of memory isrequired
Demerits
● Insertion and deletion operations are very slow since theelements should be
moved.
● Redundant memory space – difficult to estimate the sizeof array.
23 What is a circular linked list?
A circular linked list is a special type of linked list thatsupports traversing from
the end of the list to the beginning by making the last node point back to the head of the
list.
27 List out the different ways to implement the list?
1. Array Based Implementation
2. Linked list Implementation
i. Singly linked list
ii. Doubly linked list
iii. Cursor based linked list

28 Write the routine for insertion operation of singly linked list.


Void Insert (ElementType X, List L, Position P)
{Position TmpCell; TmpCell=malloc(sizeof(struct Node));
if(TmpCell==NULL)
FatalError(“Out of space!!!”);
TmpCell->Element =X; TmpCell->Next=P->Next;P->Next=TmpCell;
}
29 Advantages of Array over Linked List.
1. Array has a specific address for each element stored in itand thus we can
access any memory directly.
2. As we know the position of the middle element and otherelements are easily
accessible too, we can easily perform
BINARY SEARCH in array.
30 Disadvantages of Array over Linked List.
1. Total number of elements need to be mentioned or the memory allocation
needs to be done at the time of arraycreation
2. The size of array, once mentioned, cannot be increased inthe program. If
number of elements entered exceeds the size of the array ARRAY
OVERFLOW EXCEPTION
occurs.
1 Explain the various operations of the list ADT with examples

2 Define a data structure? What are the different types of data Structures?

3 Distinguish between linear and non-linear data structures

4 What is Single Linked List? Explain the operations of singly linked lists

5 Write the program for array implementation of lists

6 Write a C program for linked list implementation of list.

7 Write algorithm for the following insertion operations of Single linked list

a)Insert at Front b) Insert at end c) Insert at any position


8 Describe the deletion cases involved in single linked list with algorithm and
example.
a)Deletion at Front b) Deletion at end c) Deletion at any position
9 Explain the operations of doubly linked lists

10 Explain the operations of circularly linked lists

11 How polynomial manipulations are performed with lists? Explain


the operations
12 Explain the steps involved in insertion and deletion into a singlyand doubly linked list.

S. Question
No.

1 Define Stack.
A stack is an ordered list in which all insertions anddeletions are made at
one end, called the top. It is an abstract data type and based on the principle of
LIFO (Last In First Out).

2 What are the operations of the stack?


a. CreateStack/ InitStack(Stack) – creates an empty stack
b. Push(Item) – pushes an item on the top of the stack
c. Pop(Item) – removes the top most element from the stack
d. Top(Stack) – returns the first element from the stack
e. IsEmpty(Stack) – returns true if the stack is empty

3 Write the routine to push a element into a stack.


Push(Element X, Stack S)
{ if(IsFull(S)
{ Error(“Full Stack”); }else
S→Array[++S→TopOfStack]=X;
}
4 How the operations performed on linked list implementation of stack?
a. Push and pop operations at the head of the list.
b. New nodes should be inserted at the front of the list, so thatthey become the top of
the stack.
c. Nodes are removed from the front(top) of the stack.

5 What are the applications of stack?


The following are the applications of stacks
• Evaluating arithmetic expressions
• Balancing the parenthesis
• Towers of Hanoi
• Function callsTree traversal

6 What are the methods to implement stack in C?


The methods to implement stacks are:
● Array based
● Linked list based
7 How the stack is implemented by linked list?
It involves dynamically allocating memory space at runtime while performing
stack operations. Since it consumes only that much amount of space is requiredfor
holding its data elements , it prevents wastage of memory space.

struct stack
{
int element;
struct stack *next;
}*top;
8 Write the routine to pop a element from a stack.
int pop()
{ if(top==NULL)
{ printf(“\n Stack is empty.\n”);getch();exit(1);}else
{int temp;
temp=top→element; top=top→next; return temp; }}

9 Define queue.
It is a linear data structure that maintains a list ofelements such that
insertion happens at rear end and deletion happens at front end.
FIFO – First In First Out principle

10 What are the operations of a queue?


The operations of a queue are
● isEmpty()
● isFull()
● insert()
● delete()
● display()
11 Write the routine to insert a element onto a queue.
void insert(int element)
{
if(front==-1 )
{
front = rear = front +1; queue[front] = element;
return;
}
if(rear==99)
{
printf(“Queue is full”);getch();
return;
}
rear = rear +1; queue[rear]=element;
}
12 What are the types of queue?
The following are the types of queue:
● Double ended queue
● Circular queue
● Priority queue
13 Define double ended queue
● It is a special type of queue that allows insertion anddeletion of elements at
both
Ends.
● It is also termed as DEQUE.

14 What are the methods to implement queue in C?


The methods to implement queues are:
● Array based
● Linked list based
15 How the queue is implemented by linked list?
• It is based on the dynamic memory management techniqueswhich allow allocation
and
De-allocation of memory space at runtime.
Insert operation
It involves the following subtasks:
1. Reserving memory space of the size of a queue elementin memory
2. Storing the added value at the new location
3. Linking the new element with existing queue
4. Updating the rear pointer
Delete operation
It involves the following subtasks:
1. Checking whether queue is empty
2. Retrieving the front most element of the queue
3. Updating the front pointer
4. Returning the retrieved value

16 Write the routine to delete a element from a queue


int del()
{int i;
if(front == NULL) /*checking whether the queue is empty*/
{return(-9999);}else
{i = front→element;front = front→next;return i;}
}

17 What are the applications of queue?


The following are the areas in which queues are applicable
a. Simulation
b. Batch processing in an operating systems
c. Multiprogramming platform systems
d. Queuing theory
e. Printer server routines
f. Scheduling algorithms like disk scheduling , CPU scheduling
g. I/O buffer requests
18 Define circular queue
A Circular queue is a queue whose start and end locations arelogically connected with
each other. That means the start location comes after the endlocation.
19 What are push and pop operations?
• Push – adding an element to the top of stack
• Pop – removing or deleting an element from the top of stack
20 What are enqueue and dequeue operations?
• Enqueue - adding an element to the queue at the rear end
If the queue is not full, this function adds an element tothe back of the queue,
else it prints “OverFlow”.
void enqueue(int queue[], int element, int& rear, int arraySize) {if(rear == arraySize)
// Queue is full
printf(“OverFlow\n”);else{
queue[rear] = element; // Add the element to the backrear++;
}
}
• Dequeue – removing or deleting an element from the queue atthe front end
If the queue is not empty, this function removes the element from the front of the
queue, else it prints “UnderFlow”.void dequeue(int queue[], int& front, int rear) {
if(front == rear) // Queue is emptyprintf(“UnderFlow\n”);
else {
queue[front] = 0; // Delete the front elementfront++;
}
}

21 Distinguish between stack and queue.

STACK QUEUE

Insertion and deletion are made Insertion at one end rear and
at one end. deletion at other end front.

The element inserted last would The element inserted first


be removed first. So LIFO would be removed first.
structure. SoFIFO structure.

Full stack condition: Full stack

If(top==Maxsize) condition:If(rear =

Physically and Logically full = Maxsize)


stack
Logically full.
Physicallymay or may
not be full.

22 Convert the infix (a+b)*(c+d)/f into postfix & prefix expression

Postfix :ab+cd+*f/

Prefix :/*+ab+cdf
23 Write postfix from of the expression –A+B-C+D?

A-B+C-D+
24 How do you test for an empty queue?
To test for an empty queue, we have to check whether READ=HEAD where REAR is a
pointer pointing to the last node in a queue and HEAD is a pointer that pointer to the
dummy header. In the case of array implementation of queue, thecondition to be checked
for an empty queue is READ<FRONT.

25 What are the postfix and prefix forms of the expression?


A+B*(C-D)/(P-R)
Postfix form: ABCD-*PR-/+Prefix form: +A/*B-
CD-PR
27 Define priority queue with diagram and give the operations.
Priority queue is a data structure that allows at least thefollowing two
operations.
1. Insert-inserts an element at the end of the list called the rear.
2. DeleteMin-Finds, returns and removes the minimum elementin the priority Queue.

Operations: Insert, DeleteMin

28 Give the applications of priority queues.


There are three applications of priority queues
1. External sorting.
2. Greedy algorithm implementation.
3. Discrete even simulation.
4. Operating systems.
29 How do you test for an empty stack?
To check if the stack is empty, we only need to checkwhether top and bottom
are the same number.
bool stack_empty(stack S) //@requires is_stack(S);
{ return S->top == S->bottom; }
30 What are the features of stacks?
● Dynamic data structures
● Do not have a fixed size
● Do not consume a fixed amount of memory
● Size of stack changes with
each push() and pop() operation.
Each push() and pop() operation increases and decreases the size of the stack by
1, respectively.
31 Write a routine for IsEmpty condition of queue.
If a queue is empty, this function returns 'true', else it returns'false'.
bool isEmpty(int front, int rear) {return (front == rear);
}
1 Explain Stack ADT and its operations

2 Explain array based implementation of stacks

3 Explain linked list implementation of stacks


4 Explain the applications of Stacks

5 Explain how to evaluate arithmetic expressions using stacks

6 Explain queue ADT

7 Explain array based implementation of queues

8 Explain linked list implementation of queues

9 Explain the applications of queues

S.
Question
No.
1 Define non-linear data structure
Data structure which is capable of expressing more complex relationship than
that of physical adjacency is callednon-linear data structure.

2 Define tree?
A tree is a data structure, which represents hierarchicalrelationship between
individual data items.
3 Define leaf?
In a directed tree any node which has out degree o iscalled a terminal node or
a leaf.
4 Explain the representations of priority queue.
Using Heap structure, Using Linked List
6 Convert the infix expression (A-B/C)*(D/E-F) into a postfix.
Postfix: ABC/-DE/F-*
What are the steps to convert a general tree into binary tree?
* use the root of the general tree as the root of the binary tree
* determine the first child of the root. This is the leftmost nodein the general tree at
the next level
* insert this node. The child reference of the parent node refersto this node
* continue finding the first child of each parent node and insert itbelow the parent
node with the child reference of the parent to this node.
* when no more first children exist in the path just used, moveback to the
parent of the last node entered and repeat the above process. In other words,
determine the first sibling of the last node entered.
* complete the tree for all nodes. In order to locate where thenode fits you must search
for the first child at that level and then follow the sibling references toa nil where the next
sibling can be inserted. The children of any sibling node can be insertedby locating the
parent and then inserting the first child. Then the above process is repeated.
What is meant by directed tree?
8 Directed tree is an acyclic diagraph which has one node called its rootwith in degree o
while all other nodes have in degree I.
9 What is a ordered tree?
In a directed tree if the ordering of the nodes at each level isprescribed then such a
tree is called ordered tree.
10 What are the applications of binary tree?
1. Binary tree is used in data processing.
2. File index schemes
3. Hierarchical database management system
11 What is meant by traversing?
Traversing a tree means processing it in such a way, that eachnode is visited only
once.
12 What are the different types of traversing?
The different types of traversing are
a. Pre-order traversal-yields prefix form of expression.
b. In-order traversal-yields infix form of expression.
c. Post-order traversal-yields postfix form of expression.
13 What are the two methods of binary tree implementation?

Two methods to implement a binary tree are


a. Linear representation.
b. Linked representation
14 What is a balance factor in AVL trees?
Balance factor of a node is defined to be the difference between the height of the
node's left subtree and the height of the node's right subtree.

15 What is meant by pivot node?


The node to be inserted travel down the appropriate branch track along the way of the
deepest level node on the branch that has a balance factor of +1 or -1 is called pivot node.

16 What is the length of the path in a tree?


The length of the path is the number of edges on the path. In atree there is exactly one
path form the root to each node.
17 Define expression trees?
aves of an expression tree are operands such as constants orvariable names and the
other nodes contain operators.
20 Write the advantages of threaded binary tree.
The difference between a binary tree and the threaded binary tree is that in the binary trees
the nodes are null if there is no child associated with it and so there is no way to traverse
back. But in a threaded binary tree we have threads associated with the nodes i.e they
either are linked to the predecessor or successor in the in order traversal of the nodes.
This helps us to traverse further or backward in the in order traversal fashion.
There can be two types of threaded binary tree :-
1) Single Threaded: - i.e. nodes are threaded either towards itsin order predecessor or
successor.
2) Double threaded: - i.e. nodes are threaded towards both the
in order predecessor and successor.

21 What is the various representation of a binary tree?


Tree Representation Array representation Linked
list representation
22 List the application of tree.
(i) Electrical Circuit
ii) Folder structure
a. Binary tree is used in data processing.
b. File index schemes
c. Hierarchical database management system
23 Define binary tree and give the binary tree node structure.

24 What are the different ways of representing a Binary Tree?


● Linear Representation using Arrays.
● Linked Representation using Pointers.
25 Give the pre & postfix form of the expression (a +((b*(c-e))/f).

28 Define Strictly binary tree?


If every nonleaf node in a binary tree has nonempty left and rightsubtrees ,the tree is
termed as a strictly binary tree.

29 Define complete binary tree?


A complete binary tree of depth d is the strictly binary tree all ofwhose are at level d.

30 What is an almost complete binary tree?


A binary tree of depth d is an almost complete binary tree if :
_ Each leaf in the tree is either at level d or at level d-1
_ For any node nd in the tree with a right descendant at level d,allthe left descendants of
nd that are leaves are at level d.
31 Define AVL Tree.
A AVL tree is a binary search tree except that for every node inthe tree,the height of the
left and right subtrees can differ by atmost 1.

1 Define Tree. Explain the tree traversals with algorithms and


examples.
2 Construct an expression tree for the expression (a + b * c)+((d * e + 1) * g).
Give the outputs when you apply preorder,inorder and postorder traversals.
S.
N Question
o.
1 Define Graph?
A graph G consist of a nonempty set V which is a set of nodes of the graph, a set E
which is the set of edges of the graph, and a mapping from the set for edge E to a set of
pairs of elementsof V. It can also be represented as G= (V, E).

2 Explain the topological sort.


It is an Ordering of vertices in a directed acyclic graph such that if there is a path
from vi to vj, then vj appears after vi in theordering.

4 Define biconnected graph.


A connected undirected graph is biconnected if there are novertices whose removal
disconnects the rest of the graph.
5 Define shortest path problem?
For a given graph G=(V, E), with weights assigned to theedges of G, we have to
find the shortest path (path length is
defined as sum of the weights of the edges) from any given source
vertex to all the remaining vertices of G.
7 Define adjacent nodes?
Any two nodes which are connected by an edge in a graph are called adjacent nodes. For E
is associated with a pair of nodes∈example, if and edge x (u,v) where u, v V, then we say
that the edge x connects the nodes u and v. ∈

8 What is a directed graph?


A graph in which every edge is directed is called a directed graph.
9 What is a undirected graph?
A graph in which every edge is undirected is called a directedgraph.

10 What is a loop?
An edge of a graph which connects to itself is called a loopor sling.

11 What is a simple graph?


A simple graph is a graph, which has not more than one edge between a pair of nodes than
such a graph is called a simple graph.

12 What is a weighted graph?


A graph in which weights are assigned to every edge is called aweighted graph.

13 Define out degree of a graph?


In a directed graph, for any node v, the number of edges whichhave v as their initial
node is called the out degree of the node v.
14 Define indegree of a graph?
In a directed graph, for any node v, the number of edges which have v as their terminal
node is called the indegree of the node v.
15 Define path in a graph?
The path in a graph is the route taken to reach terminalnode from a starting
node.
16 What is a simple path?
A path in a diagram in which the edges are distinct is called asimple path. It is also
called as edge simple.
17 What is a cycle or a circuit?
A path which originates and ends in the same node iscalled a cycle or circuit.

18 What is an acyclic graph?


A simple diagram which does not have any cycles is calledan acyclic graph.

19 What is meant by strongly connected in a graph?


An undirected graph is connected, if there is a path fromevery vertex to every
other vertex. A directed graph with this property is called strongly connected.
20 When is a graph said to be weakly connected?
When a directed graph is not strongly connected but the underlying graph is
connected, then the graph is said to be weaklyconnected.

21 Name the different ways of representing a graph?


a. Adjacency matrix
b. Adjacency list
22 What is an undirected acyclic graph?
When every edge in an acyclic graph is undirected, it is called an undirected
acyclic graph. It is also called as undirectedforest.

23 What are the two traversal strategies used in traversing a graph?


a. Breadth first search
b. Depth first search
24 What is a minimum spanning tree?
A minimum spanning tree of an undirected graph G is a tree formed from graph
edges that connects all the vertices of G atthe lowest total cost.

30 Define Adjacency in graph.


Two node or vertices are adjacent if they are connected toeach other through an
edge. In the following example, B is adjacent to A, C is adjacent to B, and so on.

31 Define Basic Operations of Graph.


Following are basic primary operations of a Graph
● Add Vertex − Adds a vertex to the graph.
● Add Edge − Adds an edge between the two vertices of thegraph.
● Display Vertex − Displays a vertex of the graph.

32 What is Levels in graph?


Level of a node represents the generation of a node. If theroot node is at level 0,
then its next child node is at level 1, its grandchild is at level 2, and so on.

33 What is visiting and traversing in graph.


● Visiting refers to checking the value of a node whencontrol is on the node.
● Traversing means passing through nodes in a specific
order.

1 Explain the various representation of graph with example in detail?

8 Explain the breadth first search algorithm with an example.

10 Explain the depth first search algorithm with an example.


S. Question
No.

1 Define sorting
Sorting arranges the numerical and alphabetical data present in a list in a specific
order or sequence. There are a number of sorting techniques available. The algorithms can
be chosen based on the following factors
● Size of the data structure
● Algorithm efficiency
Programmer’s knowledge of the technique

2 Mention the types of sorting


● Internal sorting
● External sorting
3 What do you mean by internal and external sorting?
An internal sort is any data sorting process that takes place entirely within the main
memory of a computer. This is possible whenever the data to be sorted is small enough to
all be held in the main memory.
External sorting is a term for a class of sorting algorithms that can handle massive
amounts of data. External sorting is required when the data being sorted do not fit into the
main memory of a computing device (usually RAM) and instead they
must reside in the slower external memory (usually a hard drive).

15 Differentiate between merge sort and quick sort?


Mergesort quick sort
1. Divide and conquer strategy Divide and conquer strategy
2. Partition by position Partition by value
16 Mention some methods for choosing the pivot element in quicksort?
1. Choosing first element
2. Generate random number
3. Median of three

18 What is the need of external sorting?


External sorting is required where the input is too large to fit into memory. So external
sorting Is necessary where the program is toolarge

19 What is sorting?
Sorting is the process of arranging the given items in a logical order. Sorting is an
example where the analysis can be preciselyperformed.

20 What is mergesort?
The mergesort algorithm is a classic divide conquer strategy. Theproblem is divided into
two arrays and merged into single array
25 What does internal sorting mean?
Internal sorting is a process of sorting the data in themain memory

27 How does the bubble sort get its name?


The bubble sort derives its name from the fact that thesmallest data item
bubbles up to the top of the sorted array.
28 What is the main idea behind the selection sort?
The main idea behind the selection sort is to find the smallest entryamong in
a(j),a(j+1),… ..................... a(n) and then interchange it with a(j).
This process is then repeated for each value of j.
29 Is the heap sort always better than the quick sort?
No, the heap sort does not perform better than the quick sort.
Only when array is nearly sorted to begin with the heap sort algorithm gains an advantage.
In such a case, the quick deterioratesto its worst performance of O (n2).

31 Define radix sort


Radix Sort is a clever and intuitive little sorting algorithm.
Radix sort is a on comparative integer sorting algorithm that sorts data with integer keys
by grouping keys by the individual digits which share the same significant position

32 Define searching
Searching refers to determining whether an element is present in a given list of
elements or not. If the element is present, the search is considered as successful, otherwise
it is considered as an unsuccessful search. The choice of a searching technique is based on
the followingfactors Order of elements in the list i.e., random or sorted Size of the list

33 Mention the types of searching


The types are
● Linear search
● Binary search
34 What is meant by linear search?
Linear search or sequential search is a method for finding aparticular value in a list
that consists of checking every one of its elements, one at a timeand in sequence, until
the desired one is found.
35 What is binary search?
For binary search, the array should be arranged in ascending or descending order.
In each step, the algorithm compares the search key value with the middle element of the
array. If the key match, then a matching element has been found and its index, or Position,
is returned.
Otherwise, if the search key is less than the middle element, then the algorithm repeats
its action on the sub-array to the left of the middle element or, if the search key is greater,
on the sub-array to the right.
1 Explain the sorting algorithms

2 Explain the searching algorithms

5 Write a C program to sort the elements using bubble sort, insertionsort and radix sort.

You might also like