Vous êtes sur la page 1sur 2

SPRING-2018

Get solved assignments at nominal price.


Mail us at: subjects4u@gmail.com or contact at

08894344452, 8219081362
BACHELOR OF COMPUTER APPLICATIONS (BCA)

SEMESTER - II

SUBJECT CODE & NAME

BCA212 - Data Structure and Algorithm

Q1. Explain Adjacency Matrix and Incidence matrix form of representing a graph. 5+5
Answer. Adjacency matrix
It is a two-dimensional Boolean matrix to store the information about the graph nodes. Here the rows
and columns represent source and destination vertices and entries in the matrix indicate whether an
edge exists between the vertices

Q2. Explain in detail the traversing and searching of linked list. 5+5
Answer. Traversing a Linked List Traversing a linked list means processing each node of list exactly once.
The linked list in

Q3. Discuss the stack data structure with Push () and Pop () operation. 10
Answer. A stack is a data structures in which insertion and deletion of items are made at the one end,
called the top of the stack

Set - 2

Q1. Write the Algorithm for sorting by Partitioning.


Answer. In merge sort, the file a[1:n] was divided at its midpoint into sub arrays which were
independently sorted and later merged.
In quick sort,

Q2. Explain the Concept of travelling Salesman Problem


Answer. A tour of G is a directed simple cycle that includes every vertex in V. The cost of the tour is the
sum of the cost of the edges on the tour. The travelling salesperson problem is to find a tour of
minimum cost. Let G=(V,E) be a

Q3. Explain how Dijkstra’s algorithm is used to find the shortest path of Directed weighted graph.
10
Answer.
This algorithm is used to find the shortest path between the two vertices in a weighted directed graph
and it is also very popular and efficient to find each and every path from starting (source) to terminal
vertices. Let w(vi , vj ) be the weight associated with every edge (vi , vj ) in a given weighted directed
graph G. Let us define that the weights are such that the

SPRING-2018
Get solved assignments at nominal price.
Mail us at: subjects4u@gmail.com or contact at

08894344452, 8219081362

Vous aimerez peut-être aussi