We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d12e5d1 commit 02c4ebdCopy full SHA for 02c4ebd
Data Structures/Vertex.java
@@ -1,21 +1,13 @@
1
+static class Vertex{
2
+ public int name;
3
+ public int distance;
4
-public class Vertex {
-
- //Vertex class
5
- //probably unnecessary, but already built into Prim's Algorith implementation
6
7
- int value;
8
9
- public Vertex(int val){
10
- value=val;
+ public Vertex(int name, int distance){
+ this.name = name;
+ this.distance = distance;
11
}
12
13
- public int getValue(){
14
- return value;
15
- }
16
+
17
public String toString(){
18
- return String.valueOf(value);
+ return "Name: "+name+", Weight: "+distance;
19
20
21
0 commit comments