i have used something like dijikstra’s algorithm and maximized the result ,stored the probability given in the form of double ,and maximized the product uptil the current node ,instead of minimizing the sum like we do in djikstra’s.
Two of the test cases are getting passed ,whereas two are not.
What is the problem with following code?
Hey @chhabrapiyush480
In line 31 make it double maxV = -1.0
If your doubt is resolved please mark it as closed.
Thank you,i just needed to convert that maxv from an int to double,and i am feeling bad as how silly mistakes like this i make.
1 Like