Post History
Japt, 11 bytes £ígUsY)ô²ÎÊ Try it £ígUsY)ô²ÎÊ :Implicit input of array U £ :Map each element at 0-based index Y í : Interleave U with UsY : U...
#2: Post edited
- # [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- £ígUsY)ô²ÎÊ
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=o%2b1nVXNZKfSyzso&input=WzEsMiwyLDEsMSwyLDEsMiwyLDEsMiwxXQ)
- No idea how to measure time complexity.
- # [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- £ígUsY)ô²ÎÊ
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=o%2b1nVXNZKfSyzso&input=WzEsMiwyLDEsMSwyLDEsMiwyLDEsMiwxXQ)
- £ígUsY)ô²ÎÊ :Implicit input of array U
- £ :Map each element at 0-based index Y
- í : Interleave U with
- UsY : U sliced to index Y
- g : Reducing each pair by the sign of its difference
- ) : End interlave
- ô : Split on elements that return truthy* (not 0) when
- ² : Squared
- Î : First element
- Ê : Length
- *The `ô` method is _supposed_ to split arrays on elements that return a falsey value but, for some reason, some methods have the opposite effect, such as the exponentiation used here.
- No idea how to measure time complexity.
#1: Initial revision
# [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
£ígUsY)ô²ÎÊ
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=o%2b1nVXNZKfSyzso&input=WzEsMiwyLDEsMSwyLDEsMiwyLDEsMiwxXQ)
No idea how to measure time complexity.
