Created comparator for greedy and BFS, DFS, Greedy, Uniform are working.