This problem is one of the most important problem from the topic of stack and queue for interview preparation. The problem is find the minimum index of the city from where we can make a circular tour and cover all the cities (if possible). The time complexity of efficient approach is only O(N). CODE LINK is given below. 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 :)
CODE LINK: gist.github.co...
Негізгі бет Circular tour problem
Пікірлер: 88