如何在java中编写程序来查找图G的转置,其中程序的输入和输出表示为邻接列表结构.例如:
输入:1> 2> 3> 4> 1 输出:1> 4> 3> 2>
输入:1> 2> 3> 4> 1
输出:1> 4> 3> 2>
java graph
graph ×1
java ×1