020-002-003

Set: No Duplicate Collection

Hard

Problem Description

In this problem, you will create a program that uses a HashSet to remove duplicates from multiple input numbers and displays the unique count to standard output.

Set: No Duplicate collection

Learning Objective

Learn how to create collections without duplicates using Set.

Problem

Input multiple numbers and display the count after removing duplicates.

Input

Line 1: Count of numbers N
Line 2+: N numbers

Output

Unique count: [count without duplicates].

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up