CodeAgon 2020

please share your approch , how to do 3rd , 5th and 6th question of CodeAgon 2020

If you were able to solve 1st can you share your approach?

its simple dijkstra algo , just you need to modify 2 lines of main algo , where you checking the updation condition

If anyone was able to solve the 5th question, the zero xor one. Please share your approach.

For 3rd you need to know burnside lemma and linearity of expectation.


yes exactly, I know that any lemma is there but not sure how to implement . I you have then please share some more details.

There is a formula given on this page:

Find 2 values one for k and other for k-1, subtract them divide by the value of k, and multiply this result with k, that is \frac{N(k) - N(k-1)}{N(k)}*k

oh its direct formula . shit man