Closed chiragsalian closed 5 months ago
I see this code uses list
. If your primary use case is just checking to see if an item exists in the list, perhaps set
is a better choice, as it's much faster for random access. C++ has a variety of data structures available to choose from, so pick the best for your use case.
Will self-merge, this code has already been peer reviewed.