Ayush7614 / Ayush7614/Daily-Coding-DS-ALGO-Practice

Hoop Jump

Open
#574 2 comments 0 reactions 1 assignee Assigned to @agamgupta2015 View on GitHub
LGMSOC21 🟩 Level1
Dominant language
C++
Stars
323
Forks
472
PR merge metrics
No merged PRs in 30d

Description

# Aim

- You and your friend are playing a game with hoops. There are N hoops (where N is odd) in a row. You jump into hoop 1, and your friend jumps into hoop N. Then you jump into hoop 2, and after that, your friend jumps into hoop N−1, and so on.

The process ends when someone cannot make the next jump because the hoop is occupied by the other person. Find the last hoop that will be jumped into.

# Details

Sample Input:
2
1
3
Sample Output:
1
2

Problem Link :https://www.codechef.com/LTIME96C/problems/HOOPS
I will be using C++.
Please assign me the problem under LGM_SOC'21

### Programming language

- [ ] C
- [x] C++
- [ ] Java
- [ ] Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.