Topological sorting is giving error


Just change the data type to string as you are pushing strings in it and not a single character.