{"id":21166006,"url":"https://github.com/peterdee/pairs-test","last_synced_at":"2025-03-14T16:45:33.600Z","repository":{"id":44323653,"uuid":"196216862","full_name":"peterdee/pairs-test","owner":"peterdee","description":"Pairs multiplication test","archived":false,"fork":false,"pushed_at":"2022-12-07T07:24:16.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-21T10:11:16.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterdee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-10T14:07:25.000Z","updated_at":"2019-07-10T15:00:49.000Z","dependencies_parsed_at":"2023-01-24T14:01:00.006Z","dependency_job_id":null,"html_url":"https://github.com/peterdee/pairs-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Fpairs-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Fpairs-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Fpairs-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Fpairs-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterdee","download_url":"https://codeload.github.com/peterdee/pairs-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243615336,"owners_count":20319726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T14:47:52.868Z","updated_at":"2025-03-14T16:45:33.578Z","avatar_url":"https://github.com/peterdee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pairs test\n\n#### Task\n\n```\nYou are given a list of integers, both positive and negative.\nEach integer in the list must either be paired with another element in the list or be a single element.\nOnce the elements have been paired, the integers in the pairs are multiplied and\nthe results are summed up - the sum will include the single elements.\nWrite a program to find the sequence of pairs and singles which give the biggest possible sum,\nand calculate this max sum.\n\nExamples:\n1. For the list [0,1,2,3,4,5] the pairs (4,5) and (2,3) are formed and 0 and 1 are single elements.\nThe max. sum is 27: (20+6+0+1).\n2. For the list [-1,0,1] the pairs (-1,0) is formed and 1 is a single element.\nThe max. sum is 1.\n3. For the list [1,1] no pairs are formed only two single elements.\nThe max. sum is 2. \n\nYou choose how input/output is handled etc.\n```\n\n#### Implementation\n\nThis is a Node / Express server, that serves the static files.\n\nStatic page is shown to the user.\n\nUser can enter the values (**comma-separated, numbers and symbols**), and values are going to be processed accordingly.\n\nThe final result is going to be the sum of pairs and single elements.\n\nStatic page available at http://localhost:3030\n\n#### Calculation code\n\nhttps://gist.github.com/peterdee/1700ac54add5c396b4b8fa31c0ac3353\n\n#### Deploy\n\n- `git clone https://github.com/peterdee/pairs-test.git`\n- `cd pairs-test`\n- `nvm use 12.6`\n- `npm i`\n\n#### Launch\n\n- `npm run dev`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdee%2Fpairs-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdee%2Fpairs-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdee%2Fpairs-test/lists"}