public void DijkstraAlgorithm() {
		int s = startV; // s is the starting vertex

		// mark s as explored
		exploredNodes.add(s);
		// int indexOfS = unexploredNodes.indexOf(s);
		// unexploredNodes.remove(indexOfS);

		// update the shorted path from s to s to be 0, and add s to the Path
		// from s to s
		shortestPathNum[s - 1] = 0;
		LinkedList<Integer> pathOfS = new LinkedList<Integer>();
		pathOfS.add(s);
		shortestPath.put(s, pathOfS);

		int shortestPathLen = 0;
		int curPathLen = 0;
		int curExploredNode = 0;
		int curNeighbor = 0;

		// save the shortest path found s-v
		int shortestS = 0; // from 1-200
		int shortestV = 0; // from 1-200

		while (exploredNodes.size() < totalNumNodes) { // loop till all nodes
														// visited
			shortestPathLen = 100000; // shortest path from starting node to any
										// node in {unexplored nodes}
			curPathLen = 100000;

			// find the shorted path from {explored nodes} -> {unexplored nodes}
			for (int i = 0; i < exploredNodes.size(); i++) { // for every node
																// in
																// {explored
																// nodes}
				curExploredNode = exploredNodes.get(i);
				HashMap<Integer, Integer> neighbors = originalGraph
						.get(curExploredNode);
				Iterator<Integer> it = neighbors.keySet().iterator();
				while (it.hasNext()) {
					curNeighbor = it.next();
					if (!exploredNodes.contains(curNeighbor)) {// if neighbor
																// is not in
																// {explored
																// nodes}
						curPathLen = shortestPathNum[curExploredNode - 1]
								+ neighbors.get(curNeighbor);
						if (curPathLen < shortestPathLen) {
							shortestPathLen = curPathLen;
							// save current s-v
							shortestS = curExploredNode;
							shortestV = curNeighbor;
						}
					}
				}
			}

			// System.out.println(shortestPathLen+":("+shortestS+","+shortestV+")");

			// add node v into explored and update v's shortestPathNum and
			// shortestPath
			exploredNodes.add(shortestV);

			shortestPathNum[shortestV - 1] = shortestPathLen;
			LinkedList<Integer> pathForS = shortestPath.get(shortestS);
			LinkedList<Integer> pathForV = new LinkedList<Integer>(pathForS);
			pathForV.add(shortestV);
			shortestPath.put(shortestV, pathForV);

			// System.out.println();
			// printShortestPath();
			// System.out.println();
			// printShortestPathNums();

		}
	}