Company: Innovacer_9nov
Difficulty: medium
Family Dinner Problem Description You are given an integer 'n' meaning a big family has n members, labeled 1 through n. Because the dining table only seats k people and because some members must eat before others (perhaps children go first, or the eldest are served first, or some other house rule), the family gets through dinner across a number of separate rounds. You are also given an array of relations where relations[i] = [member1, member2], meaning member1 must finish dinner before member2 starts. Return the smallest number of rounds needed to get every member through dinner. Note: The value of k is equal to the smallest prime factor of n Input Format The first line of input contains an integer n. The second line of input contains an integer x (number of relations). The third line of input contains an integer k (indicate two integers required in each relation.) The next x lines of the input contain two integers. Constraints 2 <= n <= 15 0 <= relations.length <= n * (n-1