The TransCompilator

Solved LeetCode program · 609 of 1,000

#0836 · Rectangle Overlap

Easy Math chunk-13.md

Original English source

The first is a list of 0, 0, 2, and 2. The second is a list of 1, 1, 3, and 3. The apart is 0.
For every axis from 0 to 1.
The firstlow is item axis of first. The firsthigh is item (axis plus 2) of first. The secondlow is item axis of second. The secondhigh is item (axis plus 2) of second. If firsthigh is at most secondlow, set apart to 1. If secondhigh is at most firstlow, set apart to 1.

If apart is 1, show "false". If apart is 0, show "true".

Open in Playground Browse all 1,000 problems

Expected stdout

true