You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used two approaches to solve. Default using loop and works for large values of "n"(persons)
second approach uses recursive function but does not work for large values of n.