## Find Itinerary from a given list of tickets

Given a list of tickets, find itinerary in order using the given list. Example: Input: “Chennai” -> “Banglore” “Bombay” -> “Delhi” “Goa” -> “Chennai” “Delhi”… Read More »

## Assign directions to edges so that the directed graph remains acyclic

Given a graph with both directed and undirected edges. It is given that the directed edges don’t form cycle. How to assign directions to undirected… Read More »

## Find the minimum cost to reach destination using a train

There are N stations on route of a train. The train goes from station 0 to N-1. The ticket cost for all pair of stations… Read More »

## Given a sorted dictionary of an alien language, find order of characters

Given a sorted dictionary (array of words) of an alien language, find order of characters in the language. Examples: Input: words[] = {“baa”, “abcd”, “abca”,… Read More »

## Longest Path in a Directed Acyclic Graph

Given a Weighted Directed Acyclic Graph (DAG) and a source vertex s in it, find the longest distances from s to all other vertices in… Read More »

## Shortest Path in Directed Acyclic Graph

Given a Weighted Directed Acyclic Graph and a source vertex in the graph, find the shortest paths from given source to all other vertices. Recommended:… Read More »

## Topological Sorting

Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v… Read More »