l****e 发帖数: 1718 | 1 【 以下文字转载自 JobHunting 讨论区 】
发信人: lawbee (lawbee), 信区: JobHunting
标 题: 问一个graph题
发信站: BBS 未名空间站 (Tue May 8 16:09:12 2012, 美东)
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 |
|