Skip to content

Service for processing files consisting sequence of numbers

Notifications You must be signed in to change notification settings

YakovKontarook/SequenceOfNumbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SequenceOfNumbers

Service for processing files consisting sequence of numbers

Description:

The service allows you to process numeric data from a uploaded txt file.

Service operations:

  • maximum number in the file
  • minimum number in the file
  • median
  • arithmetic average value
  • the longest sequence of consecutive numbers in ascending or descending order

Results from Relex TestFile:

maximum number in the file = 49999978

minimum number in the file = -49999996

median = 25216.0

arithmetic average value = 7364.418442641844

the longest sequence of consecutive numbers in ascending order = {-48190694, -47725447, -43038241, -20190291, -17190728, -6172572, 8475960, 25205909, 48332507, 48676185}

the longest sequence of consecutive numbers in descending order = { 47689379, 42381213, 30043880, 12102356, -4774057, -5157723, -11217378, -23005285, -23016933, -39209115, -49148762}

Project Features:

  • The results are output in json or xml formats. The format can be changed by adding header "accept:application/xml" or "accept:application/xml"
  • A file can be passed in binary form in a post request
  • All operations with files are cached, which speeds up the output

User's guide:

1) Upload a file you want to be analized. Numbers in the file should be located line by line.

upload

Response

UploadResponsePNG

2) Select the operation you want to perform:

- maximum number in the file

MaxValuePNG

Response

MaxValueResponsePNG

- minimum number in the file

MinValuePNG

Response

MinValueResponsePNG

- median

MedianPNG

Response

MedianResponsePNG

- arithmetic average value

AveragePNG

Response

AverageResponsePNG

- the longest sequence of consecutive numbers in ascending or descending order

LongestSeqPNG

Response in ascending oreder

AscResponsePNG

Response in descending oreder

DescResponsePNG

About

Service for processing files consisting sequence of numbers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages