The TransCompilator

Solved LeetCode program · 260 of 1,000

#0349 · Intersection of Two Arrays

Easy Array chunk-06.md

Original English source

The first is a list of 1, 2, 2, and 1. The second is a list of 2 and 2. The answers is an empty list of whole numbers.
For each value in first.
If answers contains value, skip to the next one. If second contains value, Place value into answers.

Sort answers. For each value in answers, show value.

Open in Playground Browse all 1,000 problems

Expected stdout

2