##
Rearrange a string so that all same characters become d distance away
March 7, 2014

Given a string and a positive integer d. Some characters may be repeated in the given string.

March 7, 2014

Given a string and a positive integer d. Some characters may be repeated in the given string.

November 14, 2013

We introduced graph coloring and applications in previous post. As discussed in the previous post, graph coloring is widely used.

November 27, 2012

We recommend to read following two posts as a prerequisite of this post. 1. Greedy Algorithms | Set 7 (Dijkstra’s shortest path algorithm) 2. Graph and its representations

November 25, 2012

Given a graph and a source vertex in graph, find shortest paths from source to all vertices in the given graph.

November 23, 2012

We recommend to read following two posts as a prerequisite of this post.

November 18, 2012

We have discussed Kruskal’s algorithm for Minimum Spanning Tree. Like Kruskal’s algorithm, Prim’s algorithm is also a Greedy algorithm. It starts with an empty spanning tree.

November 4, 2012

We recommend to read following post as a prerequisite for this. Greedy Algorithms | Set 3 (Huffman Coding) Time complexity of the algorithm discussed in above post is O(nLogn).

November 3, 2012

Huffman coding is a lossless data compression algorithm. The idea is to assign variable-legth codes to input characters, lengths of the assigned codes are based on the frequencies of corresponding characters.

October 30, 2012

What is Minimum Spanning Tree? Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together.

March 28, 2012

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit.

March 29, 2011

Following two algorithms are generally taught for Minimum Spanning Tree (MST) problem.