+ 1
Algorithm for increasing nest
lets say a, b, c,....,n are firms. a has 2 partners x and y. b has 2 partners y and z. c has 4 partners z, p, q, r. then a belongs to group, say 1, and b also because y is common and c also because z is common and all other firms where x, p, q or r is partner belong to group 1. so x, y, z, p, q and r all related. given all persons and their firms, algorithm should be able to answer if 2 persons are of same group for eg: a and r
4 ответов
+ 2
thanks Gordie, appreciate. it gives the basic idea. really helpful.
+ 1
yes Gordie p, q etc are people being partners in those firms...c++ or python anything would do..just trying to frame logic...and last words in question to be read x and r instead a and r...thanx..