A sequence of n integers


Java Program Specifications:
you have to submit JollyJumpers.java and TestJollyJumpers.java

JOLLY JUMPERS
A sequence of n integers (n > 0) is called a jolly jumper if the absolute values of the differences between successive elements take on all possible values 1 through n - 1. For instance, 1 4 2 3 is a jolly jumper, because the absolute differences are 3, 2, and 1, respectively. Write a program to determine whether each of a number of sequences is a jolly jumper.
Input 
Each line of input contains n integers (where n > 1 and n < 500) representing the sequence. Your program should take multiple inputs (i.e., multiple sequences) as input at the same time and calculate the output for all of them.
Output 
For each line of input generate a line of output saying "Jolly" or "Not jolly".

Sample Input 
1 4 2 3
1 4 2 -1 6
2 -1 4
2 4 5 -2 7 -3
2 3 5
Sample Output 
Jolly
Not jolly
Not jolly
Not jolly
Jolly 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: A sequence of n integers
Reference No:- TGS084768

Expected delivery within 24 Hours