answer seeker
BAN USER- 0of 0 votes
AnswersGood day I just got a question which is the following
- answer seeker in United States
you have an vector like this
[JFK, LXA, SNA, RKJ, LXA, SNA]
each 2 group define a route. so,
JFK -> LXA
SNA -> RKJ
LXA -> SNA
Find the path from departure to destination. note: departure and destination are not known.
The final destination should be
JFK-> LXA -> SNA -> RKJ
The function signature is something like this
vector<string> findPath(vector<string> airports)
{
}
The airports (nodes) cannot be duplicated and the path should print all the airports (nodes)| Report Duplicate | Flag | PURGE
Bloomberg LP Applications Developer Algorithm - 0of 0 votes
AnswersGood day I just got a question which is the following
- answer seeker in United States
you have an vector like this
[JFK, LXA, SNA, RKJ, LXA, SNA]
each 2 group define a route. so,
JFK -> LXA
SNA -> RKJ
LXA -> SNA
Find the path from departure to destination. note: departure and destination are not known.
The final destination should be
JFK-> LXA -> SNA -> RKJ
The function signature is something like this
vector<string> findPath(vector<string> airports)
{
}
The needed the full path from departure to destination, and you can only pass by one point only once.
Thanks!| Report Duplicate | Flag | PURGE
Bloomberg LP Applications Developer Algorithm