The TransCompilator

Solved LeetCode program · 1 of 1,000

#0001 · Two Sum

Easy Array chunk-01.md

Original English source

Start with the list of numbers 2, 7, 11, and 15. The target is 9.
For every first from 0 to the last position of numbers.
For every second from one more than first to the last position of numbers, if item first of numbers plus item second of numbers is target, display first, display second, then stop.

Open in Playground Browse all 1,000 problems

Expected stdout

0
1