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
According to the description on the site, how is the answer Susan? If 7th person is to be eliminated then Susan gets eliminated in the second elimination. I think, in the for loop the n should be replaced by n-1. so that n-1 persons will be taken from the end of the queue to the front and hence nth person will be eliminated.
The text was updated successfully, but these errors were encountered:
According to the description on the site, how is the answer Susan? If 7th person is to be eliminated then Susan gets eliminated in the second elimination. I think, in the for loop the n should be replaced by n-1. so that n-1 persons will be taken from the end of the queue to the front and hence nth person will be eliminated.
The text was updated successfully, but these errors were encountered: