Blitzzo
It's Mr. Computer!
It's slower, but ideally you will iterate through the container to see if the element has already been stored before putting the same one in there twice.
When you get into Data Structures you'll learn how to greatly optimize that sort of thing through employing more efficient storage/retrieval methods. But that's a topic for later.
When you get into Data Structures you'll learn how to greatly optimize that sort of thing through employing more efficient storage/retrieval methods. But that's a topic for later.