Skip to content

Instantly share code, notes, and snippets.

View kienmatu's full-sized avatar
😁
Happy

Kien Dinh kienmatu

😁
Happy
View GitHub Profile
@kienmatu
kienmatu / Graph.java
Last active August 26, 2022 17:34
Sample implementation of dijkstra by Java use OOP and priority queue
package com.kiendt;
import java.util.*;
public class Graph {
private static int INFINITY = 9999;
private int[][] matrix = {
{0, 10, 20, 9999, 9999, 9999},
{9999, 0, 9999, 50, 10, 9999},
{9999, 9999, 0, 20, 33, 9999},