by admin | Jun 6, 2015 | sem3
Depth First search c++ Depth First search c++for a graph is similar to Depth First search for a tree. The only change here we do is, unlike trees, graphs may contain cycles, so we this may come to the same node again. To avoid performing a node more than once, we use...
by admin | Jun 6, 2015 | sem3
Breadth First Search C++ In graph theory, breadth first search c++ (BFS) is a graph search algorithm that begins at the root node and explores all the neighboring nodes. Then for each of those nearest nodes, it explores their unexplored neighbor nodes, and so on,...
by admin | Jun 5, 2015 | sem3
Potential Method in data structure Potential (Physicist’s) Method As we saw the aggregate method and the banker’s method for dealing with extensible arrays. Now let us look at the physicist’s method. Suppose we can define a potential function Φ (read...
by admin | Jun 5, 2015 | sem3
Accounting method in data structure Accounting (Banker’s) Method Here we explain about accounting method in data structure which is coming under Amortized Analysis .The aggregate method directly seeks a bound on the overall running time of a sequence of...
by admin | Jun 5, 2015 | sem3
Amortized Analysis Amortized analysis is a worst-case analysis of a a sequence of operations — to obtain a tighter bound on the overall or average cost per operation in the sequence than is obtained by separately analyzing each operation in the sequence. For an...
by admin | Jun 5, 2015 | sem3
C++ disjoint set About disjoint set : C++ Disjoint sets are very useful data structures that are used in many famous Algorithms, and you might consider using them in designing algorithms that include some sort of union behavior. Here we show how to implement a...