I tried solving it by enumerating all the paths and got ans 12.Can anyone provide some formula for this ?
Here we have 2 cases :
1. when we traverse 2 node in between source and destination . In that case we first have 3 choices and after that we have 2 options remaining..(3*2=6)
2. when we traverse all 3 node then in that case also we have first 3 choices then 2 and then 1...(3*2*1=6)
total way if we fixed first vertex is 6+6=12