MCPcopy Create free account
hub / github.com/Rishabh062/Hacktoberfest2021 / Node

Class Node

Java/graphs/DPQ.java:112–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112class Node implements Comparator<Node>{
113 public int node;public int cost;
114
115 public Node(){}
116 public Node(int node,int cost){
117 this.node=node;
118 this.cost=cost;
119 }
120
121 @Override
122 public int compare(Node node1,Node node2){
123 if(node1.cost < node2.cost)
124 return -1;
125 if(node1.cost > node2.cost)
126 return 1;
127 return 0;
128 }
129}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected