Category: Data Structure
-
State the logic of bubble sort algorithm.
The bubble sort repeatedly compares adjacent elements of an array. The first and second elements are compared and swapped if out of order. Then the second and third elements are compared and swapped if out of order. This sorting process continues until the last two elements of the array are compared and swapped if out…
-
Why bubble sort is called so?
The bubble sort gets its name because as array elements are sorted they gradually “bubble” to their proper positions, like bubbles rising in a glass of soda.
-
What is meant by Sorting?
Sorting is ordering of data in an increasing or decreasing fashion according to some linear relationship among the data items.
-
Articulation Points (or Cut Vertices) in a Graph
A vertex in an undirected connected graph is an articulation point (or cut vertex) if removing it (and edges through it) disconnects the graph. Articulation points represent vulnerabilities in a connected network – single points whose failure would split the network into 2 or more disconnected components. They are useful for designing reliable networks.
-
What are the two traversal strategies used in traversing a graph?
a. Breadth first searchb. Depth first search
-
Define biconnected graph?
A graph is called biconnected if there is no single node whose removal causes the graph to break into two or more pieces. A node whose removal causes the graph to become disconnected is called a cut vertex.
-
What is topological sort?
It is an ordering of the vertices in a directed acyclic graph, such that: If there is a path from u to v, then v appears after u in the ordering.
