Рет қаралды 33,885
This video explains an important graph programming interview problem which is to reconstruct itinerary.This problem can be solved by using just simple graph traversal technique by using multiset and stack.Map is used to construct the adjacency list because we need random access by string value.Multiset is used to keep the values sorted in ascending order.Stack is used to handle the route exceptions.I have explained the entire problem step by step by using proper examples and intuition for each step.I have dry run the algorithm and have also explained the code walk through at the end of the video.CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
=================================================================
INSTAGRAM: / surya.pratap.k
LinkedIn: / surya-pratap-kahar-47b...
WEBSITE: techdose.co.in/
=================================================================
CODE LINK: gist.github.co...
USEFUL LINKs:-
Representation of graph using adjacency matrix and adjacency list: • Representation of grap...
DFS: • Depth first search | D...
BFS: • Breadth first search |...