Previous
0 / 5
Module DEMO-32-107DEMO-C-32

Union of Arrays

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a function findUnion that prints the union of two arrays.

Constraints

n <= 50

Input Format

n, arr1, m, arr2

Output Format

Union values

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
3
1 2 3
3
2 3 4
1 2 3 4
Sample #2
Public sample
3
1 2 1
2
1 2
1 2

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings