Code is not running

@Piyush-Pandey-2580479718941914 lots of mistakes removed the compilation error and commented where changed

in have two doubts , what is diff between [ vector<pair<int,int>> g[n] and vector<pair<int,int>> g(n)

vector<pair<int,int>> g[n] and vector<pair<int,int>> g(n)

and why we have initialized vector in priority ueue

@Piyush-Pandey-2580479718941914 its syntax of min heap priority queue int vector int greater int just refer gfg.
g[n] means array of vectors and g(n) means single vector

see we are storing pair in heap ,greater is comparator but why we have initalized vector there

(https://www.geeksforgeeks.org/implement-min-heap-using-stl/)

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.