强烈推荐温云松同志接任国务院总理 zt (转载)# Joke - 肚皮舞运动
l*e
1 楼
given an adjacency matrix, ask you write a program to list all possible
paths that travel though all nodes without duplication.for example:
input:
a b c
a 0 1 1
b 1 0 1
c 1 0 0
output:
a b c
a c b
b a c
b c a
c a b
paths that travel though all nodes without duplication.for example:
input:
a b c
a 0 1 1
b 1 0 1
c 1 0 0
output:
a b c
a c b
b a c
b c a
c a b