0

Have any one know how to create a adjacency list graph without using any inbuilt classes and libraries in java ?

a graph without using inbuilt libraries

25th Jan 2022, 3:13 AM
NavyaSri
NavyaSri - avatar
3 Réponses
+ 2
just create a 2 dimensional list containing class Edge where Edge has the data destination vertices and the weights to reach it. if there is no weights involved simply create a 2 dimensional list of type int. how hard can that be?
25th Jan 2022, 8:42 AM
Shen Bapiro
Shen Bapiro - avatar
+ 1
I already seen that video u sent . He uses inbuilt classes from util package and list interface . Any way thank you .
25th Jan 2022, 6:47 AM
NavyaSri
NavyaSri - avatar
+ 1
Hazel Shen Bapiro Thank you both for your response.
25th Jan 2022, 9:09 AM
NavyaSri
NavyaSri - avatar