You are not logged in. Please login at to post your questions!



LINK TO THE PROBLEM ( ) I am not getting the logic ....I also tried to learn form others code but ...again m not getting their logic .here is the the link of a solution( ) but i am not able to understand why the root() function is designed like this and how it works..

asked 24 Jun '17, 15:31

popo_popo333's gravatar image

accept rate: 0%

edited 24 Jun '17, 15:33

Read this complete article and I am sure You will get the idea of Root() function.

I will solve this question after some time, then I will suggest you the approach.But I recommend you to read this article first.This will surely help you to solve many others problems too.


answered 24 Jun '17, 15:50

ayushagg31's gravatar image

accept rate: 9%

I guess you have to print number of close loop in given graph,where number of students are node and given pair are edges.

(24 Jun '17, 15:56) ayushagg311★

So basically root() function here tells you about close loop formed in given graph.This is concept is basically used in Kruskal algo to do the check for closed loop.

(24 Jun '17, 15:56) ayushagg311★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 24 Jun '17, 15:31

question was seen: 337 times

last updated: 24 Jun '17, 16:04