PhonePe Onsite | SDE

Given relations like “A > B” (A taller than B), “B < C “(B shorter than C) as Vector, where A, B, C say Persons, had to determine if the given relations are enough to sort the persons on basis of their height.

Can anyone share the approach to solve this question? Thanks

Comments (6)