Closed Manasi2001 closed 2 years ago
Aim: To output the total number of distinct inputs on a single line.
I'll use sets here. An element will only get added in a set if it's not already present. Using this idea, we can have all distinct inputs in the end.
Aim: To output the total number of distinct inputs on a single line.
I'll use sets here. An element will only get added in a set if it's not already present. Using this idea, we can have all distinct inputs in the end.