You are viewing a single comment's thread. Return to all comments →
**Very Nice Editorial but it was little bit tricky to solve **
*Consider that size of these components are a1, a2, a3,.... , ak.
So we have to pick three vertices out of given k disconnected component which can be done in S number of ways*
look at it http://qr.ae/TUT2wh for O(n*3) similar to O(n)
Seems like cookies are disabled on this browser, please enable them to open this website
Kundu and Tree
You are viewing a single comment's thread. Return to all comments →
**Very Nice Editorial but it was little bit tricky to solve **
*Consider that size of these components are a1, a2, a3,.... , ak.
So we have to pick three vertices out of given k disconnected component which can be done in S number of ways*
look at it http://qr.ae/TUT2wh for O(n*3) similar to O(n)