Question

You are asked to implement a feature that requires storing unique items and quickly checking for the existence of an item. Which data structure would be the most efficient for this?

A Array
B Linked List
C Stack
D Set (e.g., HashSet in Java, set in Python)
E Queue
Practice Next

Hey! Ask a query