Can i know how to take input dynamically from the user instead of hardcoding values

make change in the code

@kishoretaru
I have made the changes, n = vertices , m = edges, follow by m edges of type “a b”
You should be able to do these things by yourself.
To improve, give it a fair try before asking doubts.
I feel you are really rushing the course, try to do it slowly and improve your understanding.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

can you make the required change in the code

hello @kishoretaru
pls check this->

In input ->
first give number of vertices
then give number of edges
then give starting and ending vertices of all edges