cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Data structure in C++
Data structure in C++
Feb 9, 2013 at 1:29pm UTC
arnab123
(1)
To check if a set B is a subset of A or not. Which data structure to be used to store set A for quicker response(linked list/hash map)? What if I want to check intersection also?
Feb 9, 2013 at 1:37pm UTC
vlad from moscow
(6539)
It is enough to sort the both sets and to use standard algorithm std::includes or set_intersection.
Last edited on
Feb 9, 2013 at 1:39pm UTC
Topic archived. No new replies allowed.