Multisolver - Smallest, Longest, Ceil, Floor, Kthlargest Path
easy
1. You are given a graph, a src vertex and a destination vertex. 2. You are give a number named "criteria" and a number "k". 3. You are required to find and print the values of 3.1 Smallest path and it's weight separated by an "@" 3.2 Largest path and it's weight separated by an "@" 3.3 Just Larger path (than criteria in terms of weight) and it's weight separated by an "@" 3.4 Just smaller path (than criteria in terms of weight) and it's weight separated by an "@" 3.5 Kth largest path and it's weight separated by an "@"
Constraints
None
Format
Input
Input has been managed for you
Output
Check sample output
Example
Sample Input
7
9
0 1 10
1 2 10
2 3 10
0 3 40
3 4 2
4 5 3
5 6 3
4 6 8
2 5 5
0
6
30
4
Sample Output
Smallest Path = 01256@28
Largest Path = 032546@66
Just Larger Path than 30 = 012546@36
Just Smaller Path than 30 = 01256@28
4th largest path = 03456@48
Question Video