[Question]
  [
Given an Integer array:
1. Start from the first number
2. Jump forward n positions where n is the value of the current position
3. Delete the current position, making what was the next position the current position.
4. Goto step 2 until there is one number remaining
5. Print that number
**Rules**
The array wraps-around (the next number after the last number in the array is the first number).
A zero removes itself (Obviously).
Negative numbers are not allowed as input.
**Test Cases**
```
[1] => 1
[1,2] => 1
[1,2,3] => 3
[1,2,2] => 1
[1,2,3,4] => 1
[6,2,3,4] => 4
[1,2,3,4,5] => 5
[0,1] => 1
[0,0,2,0,0] => 0
```
---
**Step-by-step example**
```
[1,4,2,3,5]
 ^          start from the first position
   ^        jump 1 position (value of the position)
[1,  2,3,5] remove number in that position
     ^      take next position of the removed number (the 'new' 'current' position)
         ^  jump 2 positions
[1,  2,3  ] remove number in that position
 ^          take next position (looping on the end of the array)
     ^      jump 1 position
[1,    3  ] remove number in that position
       ^    take next position (looping)
 ^          jump 3 positions (looping on the end of the array)
[      3  ] remove number in that position
print 3
```
**Example #2**
```
[4,3,2,1,6,3]
 ^            start from the first position
         ^    jump 4 positions
[4,3,2,1,  3] remove number in that position    
           ^  take next position
     ^        jump 3 positions
[4,3,  1,  3] remove number in that position    
       ^      take next position
           ^  jump 1 positions
[4,3,  1    ] remove number in that position    
 ^            take next position
   ^          jump 4 positions
[4,    1    ] remove number in that position    
       ^      take next position
 ^            jump 1 position
[      1    ] remove number in that position
print 1
```
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), the shortest answer in bytes wins!
  
[Answer]
# [Husk](https://github.com/barbuz/Husk), 7 bytes
This returns the result as a singleton list
```
ΩεSotṙ←
```
[Try it online!](https://tio.run/##yygtzv6vcGhbrsajpsYizUPb/p9beW5rcH7Jw50zH7VN@P//f7RhLFe0oY4RhNQxhtJwvo4JkGUGZ0HFdEyBbAMdQzBpABQDkrEA "Husk – Try It Online")
### Explanation
```
Ω               Until
 ε              the result is a singleton list
     ṙ          Rotate left by
  S   ←         the first element
   ot           Then remove the first element  
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~54~~ ~~50~~ 48 bytes
```
f[x]=x
f(x:r)=f$snd<$>zip r(drop(x+1)$cycle$x:r)
```
[Try it online!](https://tio.run/##TY1NDoIwFIT37xRv0UWJxVD5WRjhBp6g6YIAjUTABlxUjWevBRtgM52ZvnxzK6d703XWKmFkbkBRcx6DXJFpqC@keLcaR1qPD03NgQekelVdQ@YT25ftgDn2pb4i1WM7PPGIKkAhuGSCs9NfWezfNbPEuWx1vmOp8xHji0aucyolwCcEB8S8QA4LdbMOPYcYPH//49A@ZruYwG5uLlJYNv3pNjwXEYRf@wM "Haskell – Try It Online")
**Explanation:**
* `f[x]=x`: If the given list is a singleton list, return its element.
* `f(x:r)=f$ ...`: Otherwise recursively apply `f` to the following list:
	+ The elements of the current list cycled infinitely (`cycle$x:r`),
	+ with the first `x+1` elements removed (`drop(x+1)$`),
	+ and truncated to length of `r`. (`snd<$>zip r` is a shorter alternative to `take(length r)`).
---
### Previous 54 byte version:
```
f=(%)=<<head
_%[x]=x
n%(x:r)|n<1=f r|s<-r++[x]=(n-1)%s
```
[Try it online!](https://tio.run/##TY1BCoMwFET3/xR/E4gYi6nWRTG9QU8QQglUUapBYhdC7dltYoO6mczMD28aPb6qrluWWlASibJsKv2EB5GTEhMYQqerjWZTclGjnccysXHsb9QkPCLj0uvWoMBeD3ekg23NG09YRyglV0xydv4ry8K7ZZY7V2wudOzifMr4qqnrnCoF8EnAAVHckMNK3a1D@5BB4B8vDh1icYg5HOZ8cYF1M3zdh32RQvJdfg "Haskell – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), 37 bytes
```
->r{r.rotate!(r[0]).shift while r[1]}
```
Modifies the array in-place, which appears to be acceptable as output. [Try it online!](https://tio.run/##ZY/RCoJAEEXf/YpJEAqmZU3tTX9kkTBZU5SU3dUK9dtt2ofY6GW499w7DKPG62ur0u2YqVkx1ZvCyN1eCZ4fmK6bysCjbjoJSoT5us0eAAlIMwjRajz9Ooysj77@L8fYIWeHxG4HE8sSyzi6Nzly6tC0jKO3MlmUNcxLi9MCw2g0@IH@hIFGkM9Blqa538j5EIBomekvFFSizRfagYk@ewM "Ruby – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), ~~54~~ 51 bytes
```
f=lambda x:x and f((x+x*x[0])[x[0]:][1:len(x)])or x
```
Output is a singleton list.
[Try it online!](https://tio.run/##RY5BCoMwEEXX7SlmIyZ2BKOplEB7kZCFxYYKNoq6mJ4@TdTi5s2bz2eY8bu8B1d5b@9983m2DZAiaFwLljG6UEa6MFxHKqOF6l@OETd8mIC8jYTOgRYGA7DcB1Z/ORKUUetD9xSvcSlQbKMIaeBWkGtlLcggJQqsw211Po1T5xaWJrm4zZA/IJlTSIARQmbDg5z7Hw "Python 3 – Try It Online")
[Answer]
## [CJam](https://sourceforge.net/p/cjam), 15 bytes
```
l~_,({_0=m<1>}*
```
[Try it online!](https://tio.run/##S85KzP1f/T@nLl5HozrewDbXxtCuVut/bF6tpdb/aMNYrmhDBSMIqWAMpeF8BRMgywzOgoopmALZBgqGYNIAKAYkYwE "CJam – Try It Online")
### Explanation
Instead of keeping track of a pointer, I just shift the array cyclically so that the current element is always at the front.
```
l~     e# Read and evaluate input.
_,(    e# Get its length L and decrement to L-1.
{      e# Run this block L-1 times...
  _0=  e#   Get the first element X.
  m<   e#   Rotate the array left by X positions.
  1>   e#   Discard the first element.
}*
       e# The final element remains on the stack and gets printed implicitly.
```
A fun alternative which unfortunately doesn't save any bytes:
```
l~_{;m<1>_0=}*;
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 21 bytes
```
1`yy)+ynX\[]w(5Mynq]x
```
[Try it online!](https://tio.run/##y00syfn/3zChslJTuzIvIiY6tlzD1LcyrzC24v//aEMdEx0jHWMd01gA "MATL – Try It Online") Or [verify all test cases](https://tio.run/##y00syfmf8N8wobJSU7syLyImOrZcw9S3Mq8wtuK/S8j/aEMdEx0jHWMd01iuaBMgbaRjqGOmYxwLAA).
### Explanation
```
1        % Push 1: current position in the array
`        % Do...while
  yy     %   Duplicate top two elements in the stack. Takes input implicitly
         %   in the first iteration.
         %   STACK: array, position, array, position
  )      %   Get specified entry in the array
         %   STACK: array, position, selected entry
  +      %   Add
         %   STACK: array, position (updated)
  y      %   Duplicate from below
         %   STACK: array, position, array
  n      %   Number of elements of array
         %   STACK: array, position, number of elements or array
  X\     %   1-based modulus
         %   STACK: array, position (wrapped around)
  []     %   Push empty array
         %   STACK: array, position, []
  w      %   Swap
         %   STACK: array, [], position
  (      %   Write value into specified entry in array. Writing [] removes
         %   the entry
         %   STACK: array (with one entry removed)
  5M     %   Push latest used position. Because of the removal, this now
         %   points to the entry that was after the removed one
         %   STACK: array, position
  y      %   Duplicate from below
         %   STACK: array, position, array
  n      %   Number of elements of array
         %   STACK: array, position, number of elements of array
  q      %   Subtract 1
         %   STACK: array, position, number of elements of array minus 1
]        % End. If top of the stack is nonzero, proceed with next iteration
         % STACK: array (containing 1 entry), position
x        % Delete. Implicitly display
         % STACK: array (containing 1 entry)
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 bytes
```
ṙḷ/ḊµḊ¿
```
[Try it online!](https://tio.run/##y0rNyan8///hzpkPd2zXf7ij69BWELH/////0YY6CkY6CsY6CiY6CqaxAA "Jelly – Try It Online")
Full program.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 9 bytes
```
ṙḷ/ḊµL’$¡
```
[Try it online!](https://tio.run/##y0rNyan8///hzpkPd2zXf7ij69BWn0cNM1UOLfx/uP1R05r//6MNY3WiDXWMIKSOMZSG83VMgCwzOAsqpmMKZBvoGIJJA6AYkIwFAA "Jelly – Try It Online")
-2 bytes thanks to user202729
# Explanation
```
ṙḷ/ḊµL’$¡  Main Link
     L’$¡  Repeat <length - 1> times
ṙ          Rotate left by
 ḷ/        The first element (from JHT; thanks to user202729)
   Ḋ       Take all but the first element
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 88 bytes
```
([[]]()){({}<(({})){({}<({}<([]){({}{}<>)<>([])}{}>)<>{({}[<>[]])<>}<>>[()])}{}{}>())}{}
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/XyM6OjZWQ1OzWqO61kYDSMCYIBwdC@YAmXaaNnYgLpANYoJEo23sgFqBHKCsXbSGJlgSKA00DEj9/2/IZcJlxGXMZQoA "Brain-Flak – Try It Online")
### Explanation
```
([[]]())                      Push negative N: the stack height - 1
{({}< … >())}{}               Do N times
     (({}))                     Duplicate M: the top of the stack
     {({}< … >[()])}{}          Do M times 
                                  Rotate the stack by 1:
          ({}< … >)               Pop the top of the stack and put it back down after
          ([]){({}{}<>)<>([])}{}  Pushing the rest of the stack on to the other one, in reverse, with the stack height added to each element (to ensure that all are positive)
          <>{({}[<>[]])<>}<>      Push the rest of the stack back, unreversing, and subtracting the stack height from each element
                      {}        Pop the top of stack
```
[Answer]
# [Python 2](https://docs.python.org/2/), 55 bytes
```
def f(a):
 while a[1:]:l=a[0]%len(a);a[:]=a[-~l:]+a[:l]
```
[Try it online!](https://tio.run/##HYk7CoAwDED3nCKLoFjB7xLxJCVDwBaFUEVEcfHqtbi9z/6cyxbaGGfn0edSEOC9rOpQbENMOomtOVMX0hvFEqdQvUpcJlGOlxw4oW1Mb1rTmYEBfJ5iAbAfazh/jh8 "Python 2 – Try It Online")
Outputs as a singleton list, as [allowed by default](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods/11884#11884).
 Saved a few bytes thanks to [Dennis](https://codegolf.stackexchange.com/users/12012), by reminding me that modifying the function argument is allowed.
### How it works
* `def f(a)` - Defines a function with a parameter `a`.
* `while a[1:]:` - While `a` with the first element removed is truthy, run the block of code to follow. A list with one element or more is truthy, and empty lists are falsy in Python, hence this will stop once `a` reaches a length of 1.
* `l=a[0]%len(a)` - Take the first element, and get the remainder of its division by the length of `a`. Assign the result to `l`.
* `a[:]=a[-~l:]+a[:l]` - Rotate `a` to the left by `l` elements, and remove the first one, while assigning this to `a` in place.
---
**[Python 2](https://docs.python.org/2/), 63 bytes**
```
f=lambda a,i=0:a[1:]and f(a,a.pop(((a*-~i)[i]+i)%len(a))+1)or a
```
[Try it online!](https://tio.run/##bcyxCsIwEIDh3afIItzZU7w0dij0SUKGkxo8qEkoXVx89ShFhILrx89fnss9J1trHCZ5XEcxQjqce/HcB0mjiSAkp5ILAMjh@FL0GhrF/XRLIIgNY56N1DJrWiCCZ3JkqaVLQNz91H3EElNH7cZ5bd3Guj/27dZrfQM "Python 2 – Try It Online")
Although longer, this seems much more elegant. Also thanks to ovs for helping in chat.
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), ~~20~~ 18 bytes
```
{1<≢⍵:∇1↓⊖∘⍵⊃⍵⋄⊃⍵}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R24RqQ5tHnYse9W61etTRbviobfKjrmmPOmYABR51NYPI7hYIoxaoXsGQC4gVjCCkgjGUhvMVTIAsMzgLKqZgCmQbgPUaAKERiAQA "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 60 bytes
```
def f(a):b=a[0]%len(a);return f(a[-~b:]+a[:b])if a[1:]else a
```
[Try it online!](https://tio.run/##ZY5BT4QwEIXP8CtmSUjaWA3IrgcMHj172FvTwyDTbCMB0hZxL/51bDGua7xM5r1v8uZNZ38ah2pdO9KgGfK6bVAWKu9pCOrRkp/tEIm8/WxrdYOybhU3GlCWtaLeEeC6nExPcLQz1Wni7TnMxAgYoQEzTLNn/M5NvfEsg@YJMv6LNaN37JnhXIRTz8aNaTDQNCBHFZOSyUaUHcl5eEHnqNttGfH7v4NnDF26HbBx9uE1LOggd9CGFQe3kAUTDZ5BDiy24CGKPl5p8jGrtYRvqyxVbFqmshT3V6uoNlF9i79E7H/kw5XcX6g4bMYhlYW4xBeiCDTMzSi@AA "Python 3 – Try It Online")
-3 bytes thanks to ovs
[Answer]
# [J](http://jsoftware.com/), 21 17 bytes
-4 bytes thanks to FrownyFrog
```
((1<#)}.{.|.])^:_
```
[Try it online!](https://tio.run/##y/qfVmyrp2CgYGXwX0PD0EZZs1avWq9GL1Yzzir@vyaXkp6CepqtnrqCjkKtlUJaMVdqcka@QpqCIZyhYITEVDBG5qDKKJjAuGaoXKisgilMwABhvAEQGoHI/wA "J – Try It Online")
Original:
`([:}.{.|.])^:(1<#)^:_`
# How it works:
`^:_` repeat until the result stops changing
`^:(1<#)` if the length of the list is greater than 1
`{.|.]` rotate the list to the left its first item times
`[:}.` drop the first element and cap the fork
[Try it online!](https://tio.run/##y/qfVmyrp2CgYGXwXyPaqlavWq9GL1YzzkrD0EYZSMX/1@RS0lNQT7PVU1fQUai1Ukgr5kpNzshXSFMwhDMUjJCYCsbIHFQZBRMY1wyVC5VVMIUJGCCMNwBCIxD5HwA "J – Try It Online")
[Answer]
# JavaScript (ES6), ~~54~~ 60 bytes
*Saved 1 byte thanks to @Shaggy*  
*Fixed version (+6 bytes)*
[Modifies the input array](https://codegolf.meta.stackexchange.com/a/4942/58563), which is reduced to a singleton.
```
f=(a,p=0)=>1/a||f(a,p=(p+a[p%(l=a.length)])%l,a.splice(p,1))
```
### Test cases
```
f=(a,p=0)=>1/a||f(a,p=(p+a[p%(l=a.length)])%l,a.splice(p,1))
;[
  [1],         // [1]
  [1,2],       // [1]
  [1,2,3],     // [3]
  [1,2,2],     // [1]
  [1,2,3,4],   // [1]
  [6,2,3,4],   // [4]
  [1,2,3,4,5], // [5]
  [0,1],       // [1]
  [0,0,2,0,0], // [0]
  [3,5,7,9]    // [5]
].forEach(a => f(a) && console.log(JSON.stringify(a)))
```
### How?
We recursively apply the algorithm described in the challenge. Only the stop condition `1/a` may seem a bit weird. When applying an arithmetic operator:
* Arrays of more than one element are coerced to `NaN` and `1/NaN` is also `NaN` (falsy).
* Arrays of exactly one integer are coerced to that integer, leading to either `1/0 = +Infinity` or `1/N = positive float` for **N > 0** (both truthy).
```
f = (a, p = 0) =>                 // a = input array, p = pointer into this array
  1 / a ||                        // if a is not yet a singleton:
    f(                            //   do a recursive call with:
      a,                          //     a
      p = (                       //     the updated pointer
        p + a[p % (l = a.length)] //
      ) % l,                      //
      a.splice(p, 1)              //     the element at the new position removed
    )                             //   end of recursive call
```
[Answer]
# [Julia 0.6](http://julialang.org/), 46 42 bytes
```
!x=length(x)>1?!circshift(x,-x[])[2:end]:x
```
[Try it online!](https://tio.run/##PY1BCoMwFET3nuJHXCTwBWNbF4L2ICGLYLX@EmJJI@T2aWjFzZs3s5nXbsl0KbE42Nk9w8qjGOWdTeSnz0pL4BHrqLRQbT@7h@5jWjYPBsiBUlKjktj@iZcjz47XbN1px4a37A3KH5u8ZWpdALw9uWAdLysDwwgVZ0aUosi36Qs "Julia 0.6 – Try It Online")
Straightforward recursive Julia version. `x[]` accesses the first element of x.
[Answer]
# Java 8, 79 bytes
This lambda accepts a `Stack<Integer>` and returns an `int` or `Integer`.
```
l->{for(int i=0,s=l.size();s>1;)l.remove(i=(i+l.get(i%s))%s--);return l.pop();}
```
[Try It Online](https://tio.run/##dVBNawIxED3rr5iLkNDdUNvSy7qCUAot7clj6SHdjdvRmITMrMXK/vZtXCyC4CHkMXlfk7Xe6dwH49b1pg/tl8UKKquJ4F2jg8N4dBoSa07XCp22sE4q1TJatWpdxeidej6B2fltybrazF4cm8bEeQb/COq22jyl8@rJhO@WoOxtPj@sfBToGLC8zai0ivDXCFnQfFpIq6LZ@p0RWAq8saoxLHBCUk4oz2URDbfRgVXBhyTp@lExvqy@81jDNm0llhzRNR@foGND8rjk6FprQBdahhKc@YFrpJSYLAam0nW9sFacqYsY9Z6UpjckFkebkyzlHx4yuM/gLoNpBo8Jd3KwWu6JzVb55BdSVbZOXP6Z0iHYvRhCB1E37vo/)
## Ungolfed
```
l -> {
    for (
        int i = 0, s = l.size()
        ; s > 1
        ;
    )
        l.remove(
            i = (i + l.get(i % s)) % s--
        );
    return l.pop();
}
```
## Acknowledgments
* -2 bytes thanks to Nahuel Fouilleul
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 9 bytes
```
.WtHt.<Zh
```
**[Try it here!](https://pyth.herokuapp.com/?code=.WtHt.%3CZh&input=%5B1%2C+2%2C+3%2C+4%2C+5%5D&test_suite=1&test_suite_input=%5B1%5D%0A%5B1%2C2%5D%0A%5B1%2C2%2C3%5D%0A%5B1%2C2%2C2%5D%0A%5B1%2C2%2C3%2C4%5D%0A%5B6%2C2%2C3%2C4%5D%0A%5B1%2C2%2C3%2C4%2C5%5D%0A%5B0%2C1%5D%0A%5B0%2C0%2C2%2C0%2C0%5D&debug=0)**
This outputs the result as a singleton list, as [allowed by default](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods/11884#11884).
### How it works
```
.WtHt.<Zh ~ Full program.
.W        ~ Functional while. It takes three arguments, two functions: A and B
            and a starting value, which in this case is automatically assigned
            to the input. While A(value) is truthy, value is set to B(value).
            Returns the ending value. A's argument is H and B's is Z.
  tH      ~ A (argument H): Remove the first element of H. A singleton list
            turns into [], which is falsy and thus breaks the loop. Otherwise,
            it is truthy and the loops goes on until the list reaches length 1.
     .<Zh ~ B (argument Z): Cyclically rotate Z by Z[0] places, whereas Z[0]
            represents the first element of Z.
    t     ~ And remove the first element.
```
**Note:** If you don't want to see those brackets, just add `h` or `e` in front of the whole code.
[Answer]
# [Swift](https://swift.org), 87 bytes
```
func f(a:inout[Int]){var i=0,c=0;while(c=a.count,c>1).1{i=(i+a[i%c])%c;a.remove(at:i)}}
```
Returns as a [singleton list](https://codegolf.meta.stackexchange.com/a/11884/70894) by [modifying the input](https://codegolf.meta.stackexchange.com/a/4942/70894). [Try it online!](https://tio.run/##Fc1BCoMwEADAe16RiyVLFzFVelDSe98QPCyL0oU2KWnUg/j2FD8w89tkzl0p8xJYz4Z6CXHJ/hnyCPtKSYtrkF0zbC95T4Yd1RyXkJEfFmq7izNyJS8Vj1DxQHWaPnGdDOVe4DjKSZB22nfY4g0t3rEdlTqnC4FS3yQhG4LyBw "Swift 4 – Try It Online")
## Explanation
```
func f(a:inout[Int]){
  var i=0,c=0;            // Set the index i to 0
  while(c=a.count,c>1).1{ // While the length of the list > 0:
    i=(i+a[i%c])%c;       //  Add a[i] to i and loop back using modulo
    a.remove(at:i)        //  Remove a[i]
  }
}
```
[Answer]
# Mathematica, 36 bytes
uses Martin's algorithm
```
#//.l:{x_,__}:>Rest@RotateLeft[l,x]&
```
-5 bytes from Misha Lavrov && Martin Ender
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7X1lfX8/KLii1uMQhKL8ksSTVJzWtJLq6QqeyVqcyOtowNjZW7X9AUWZeiUNadLVhbSwXgqNjhMbVMUYXwFShY4IsZIYpBFWlY4osaKBjiMo1AKoCkrWx/wE "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 104 bytes
*H.PWiz has a shorter answer [here](https://codegolf.stackexchange.com/a/150471/56656) that I helped to make, you should check it out.*
```
([[]]()){({}()<(({})){({}[()]<({}<(([])<{{}({}<>)<>([])}{}<>>)<>>)<>{({}[()]<({}<>)<>>)}{}<>>)}{}{}>)}{}
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/XyM6OjZWQ1OzWqO6VkPTRgNIQTjRGpqxNkAaKBQdq2lTDZQGcuw0bexA/FoQG8QBYRTlEEGoPJCqrgVT//8bKhgpGCuYKJgqmAEA "Brain-Flak – Try It Online")
## Explanation
```
([[]]())   #Push 1 minus stackheight
{({}()<    #N times
 (({}))    #Get a copy of the top
 {({}[()]< #N times
  ({}<(([])<{{}({}<>)<>([])}{}<>>)<>>)<>{({}[()]<({}<>)<>>)}{}<>
           #Roll the top to the bottom (From the wiki)
 >)}{}     #End loop
 {}        #Remove one value
>)}{}      #End loop
```
[Answer]
# [Perl 6](http://perl6.org/), ~~46~~ 45 bytes
(-1 byte thanks to Brad Gilbert)
```
{($_,{(|$_ xx*)[.[0]+(1..^$_)]}...1)[*-1][0]}
```
[Try it online!](https://tio.run/##RYrLCsIwFER/ZShBkloviY9uavMjIQYXZqUoddMS8@3xFivdzJw5zOs23NvymLCJ6EuSIjRJfkTAONbKkdN@Kw3RRQTlMxEZ5eqd8exz6fC@Tqj43FukCBFyhfgccDa24cB@KRz@sBocZ2xXXCxO89Awv9JsOW1Xvg "Perl 6 – Try It Online")
`($_, { ... } ... 1)` generates a sequence of lists, starting with the input list `$_`, each successive element being generated by the brace expression, and terminating when the list smart-matches `1`--ie, has a length of 1. The trailing `[* - 1]` obtains the final element, and the final `[0]` takes the sole element out of that singleton list.
`(|$_ xx *)` generates a flat, infinitely replicated copy of the current element. This list is indexed with the range `.[0] + (1 ..^ $_)` to extract the next finite list in the series.
[Answer]
# [Perl 5](https://www.perl.org/), ~~47~~ ~~43~~ 41 + 2 (`-ap`) = 43 bytes
```
$\=splice@F,($_+=$F[$_%@F])%@F,1while@F}{
```
[Try it online!](https://tio.run/##K0gtyjH9/18lxra4ICczOdXBTUdDJV7bVsUtWiVe1cEtVhNI6BiWZ2TmAOVqq///N1QwUjBWMFEw/ZdfUJKZn1f8X9fXVM/A0OC/bmIBAA "Perl 5 – Try It Online")
Takes input as space separated numbers.
[Answer]
# [Haskell](https://www.haskell.org/), 56 bytes
```
f[x]=x
f l|m<-head l`mod`length l=f$drop(m+1)l++take m l
```
[Try it online!](https://tio.run/##ZYo7DoMwEAV7TvGKFCA7EeRDFR8hJ0CWsIQdEGtjERcUubtDKMiHrWZmX6sevSaK0VSTFFNiQE973bdaNaDaDk1N2t1DCxJm14yDTy0rMmIsqF7DgqJVnYOAVf6G1I@dCzjAZEgwX4WqkAvxmTiOP8Jx@vPNn@O8pnKbPiuOy1pzjuJb8mX1BgkZXw "Haskell – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), ~~57~~ 56 bytes
```
f=lambda a,*b:f(*([a,*b]*-~a)[a+1:a-~len(b)])if b else a
```
[Try it online!](https://tio.run/##XY/BDoIwDIbvPkVvbFiSIeCBZL7IssMWt0iCQNg8eOHV54ZR0B6a/l//pu309LdxqEKwvFd3fVWgMNetJTkRqZJ5sSgq1LFsVbH0ZiCaStpZ0GB6Z0AFb5x3wEEIUUqEmCTGEk8/Aqskq6/872K9gfMG6r0Dm4SaFTHcLWPIoiPmhJiU8mDHGdJhCLNxj95DN6zatQeIMc3d4El8MjHK@dsk0vw6lfFLhp82DS8 "Python 3 – Try It Online")
[Answer]
# [Java 8](http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html), 325 Bytes
Golfed:
```
static void n(Integer[]j){Integer[]h;int a=0;h=j;for(int i=0;i<j.length-1;i++){if(h.length==a){a=0;}a=(a+h[a])%h.length;h[a]=null;h=m(h);}System.out.print(h[0]);}static Integer[] m(Integer[]array){Integer[]x=new Integer[array.length-1];int z=0;for(int i=0;i<array.length;i++){if(array[i]!=null){x[z]=array[i];z++;}}return x;}
```
Ungolfed:
```
 interface ArrayLeapFrog {
static void main(String[] z) throws Exception {
    Integer[] j = {6, 2, 3, 4};
    n(j);
}
static void n(Integer[] j) {
    Integer[] h;
    int a = 0;
    h = j;
    for (int i = 0; i < j.length - 1; i++) {
        if (h.length == a) {
            a = 0;
        }
        a = (a + h[a]) % h.length;
        h[a] = null;
        h = m(h);
    }
    System.out.print(h[0]);
}
static Integer[] m(Integer[] array) {
    Integer[] x = new Integer[array.length - 1];
    int z = 0;
    for (int i = 0; i < array.length; i++) {
        if (array[i] != null) {
            x[z] = array[i];
            z++;
        }
    }
    return x;
  }
}
```
[Answer]
# APL+WIN, 36 bytes
```
¯1↑⍎¨(1⌈¯1+⍴v←,⎕)⍴⊂'v←(1<⍴v)↓v[1]⌽v'
```
Explanation:
Prompts for screen input.
```
'v←(1<⍴v)↓v[1]⌽v' Loop logic as a string
 (1<⍴v)↓ only drop the first when number of elements n>1
 (1⌈¯1+⍴v←,⎕)⍴⊂ create a nested vector of logic of length 1 max n-1
 ⍎¨ execute each element of the nested vector in turn
¯1↑ take answer from executing final element
```
[Answer]
# Python 2, 61 bytes
```
def f(x):
 while x[1:]:y=x[0]%len(x);x=x[y+1:]+x[:y]
 print x
```
[Answer]
# JavaScript, ~~58~~ ~~56~~ 59 bytes
```
let f =
a=>{for(i=0,k=a.length;k>1;)i+=a[i%=k],a.splice(i%=k--,1)}
```
```
<h2>Test</h2>
Enter or paste a valid array literal within square brackets and click Run.
<blockquote>
   <input id = "array" type="text" length="20">
   <button type="button" onclick="run()">Run</button>
</blockquote>
Result: <pre id="o"></pre>
<script>
    function run() {
       let a = JSON.parse(array.value);
       f(a);
       o.textContent = a;
    }
</script>
```
Returns the result as the only element remaining in the input array which is updated in place.
Two bytes saved by using a comma separated statement instead of a block statement in the for loop body! Three bytes lost to skip from an element deleted at end of array (:
**Less golfed:**
```
a => {
    for(i=0,k=a.length;k>1;) // once less than array length
        i+=a[i%=k],          // the new index
        a.splice(            // delete an element
           i%=k--,           // ensuring index is within array,
                             // and post decrement loop count
           1
        )
}
```
[Answer]
# [Clean](https://clean.cs.ru.nl), 78 bytes
Uses the same method as [Laikoni's Haskell answer](https://codegolf.stackexchange.com/a/150460/18730).
```
import StdEnv
f[e]=e
f[x:r]=f(take(length r)(drop(x+1)(flatten(repeat[x:r]))))
```
[Try it online!](https://tio.run/##HYyxDsIgEEB3v4LxiDrU0YRNBxO3jg3DBY5KBEroaerPexLf8paX5xJhkbz4VyKVMRaJuS6N1cj@Wt67MJE11LWdmzUBGJ8EicrMD9U0@LZU2PaDhpCQmQo0qoT8z3VHRsZ@MyqoaTicrHxdL@dVjre7XD4Fc3TrDw "Clean – Try It Online")
[Answer]
# [R](https://www.r-project.org/), 111 ~~117~~ ~~126~~ bytes
Thanks to @Giuseppe for golfing off 11 bytes by changing to a while loop, got another 4 by removing the function and reading user input directly.
I don't feel great about what it took to get there - I'm sure a more elegant solution exists.
```
i=scan();m=1;while((l=sum(i|1))-1){j=i[m];p=`if`(j+m>l,j%%l+!m-1,j+m);p=`if`(!p,m,p);i=i[-p];m=`if`(p-l,p,1)};i
```
[Try it online!](https://tio.run/##NYzLCsJADEX38xddFCY0s4iPVYg/UgoVUcwwkWApLqrfPg6Cy3sO5z5rVVku50cENiF@3bVcYyyyrBb1TQCJYMuio03sMuttjnmwU8Hc92XoLBG2DX/XORo6sLYi@dQ@f9hTQUeCD2ulcAi7sA/H@gU "R – Try It Online")
Ungolfed code
```
i=scan()
m=1
while((l=sum(i|1))-1){
  j=i[m]
  p=`if`(j+m>l,j%%l+!m-1,j+m)
  p=`if`(!p,m,p)
  i=i[-p]
  m=`if`(p-l,p,1)
}
i
```
]