The TransCompilator

Solved LeetCode program · 939 of 1,000

#1304 · Find N Unique Integers Sum up to Zero

Easy Array chunk-19.md

Original English source

The count is 5. The pairs is count divided by 2. The answers is an empty list of whole numbers.
For every offset from 0 to pairs minus 1.
The value is pairs minus offset. Place 0 minus value into answers.

If count modulo 2 is 1, Place 0 into answers.
For every offset from 0 to pairs minus 1.
The value is offset plus 1. Place value into answers.

The pieces is an empty list of text.
For each answer in answers.
The piece is format whole number answer as text. Place piece into pieces.

The line is join pieces with ",". Show line.

Open in Playground Browse all 1,000 problems

Expected stdout

-2,-1,0,1,2