Starting implementation of Dijsktra algorithm through a singleton class