sichkar-valentyn / jolly_jumper_sequence

Checking if the input is so called "jolly jumper"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jolly jumper sequence

Checking if the input sequence is so called "jolly jumper"

Reference to:

[1] Valentyn N Sichkar. Checking if the input sequence is so called "jolly jumper" // GitHub platform [Electronic resource]. URL: https://github.com/sichkar-valentyn/jolly_jumper_sequence (date of access: XX.XX.XXXX)

Description

Program checks the input sequence for the feature of 'jolly jumper'.
Jolly jumper is a sequence that takes all possible values from 1 to n-1 from subtraction of neighbour elements.
For example input sequence 1 -3 -4 1 -1 is 'jolly jumper', because result is the sequence 4 1 3 2 which consists of all possible elements between 1 and 4(5-1).


MIT License

Copyright (c) 2018 Valentyn N Sichkar

github.com/sichkar-valentyn

Reference to:

[1] Valentyn N Sichkar. Checking if the input sequence is so called "jolly jumper" // GitHub platform [Electronic resource]. URL: https://github.com/sichkar-valentyn/jolly_jumper_sequence (date of access: XX.XX.XXXX)

About

Checking if the input is so called "jolly jumper"

License:MIT License


Languages

Language:Python 100.0%