Data Structured62_q1c_vector_intersection
Vector Intersection
07fec696-20e9-4f7b-b0e3-c1b2d90e7bec.cC
1// Loading code...Selected Submission
100 / 100
0.27s
20004 KB
HashMapOrdered Map
Time Comp.
O(n log n + m log m + k log k), where n and m are the sizes of s1 and s2 respectively, and k is the size of the intersection.
Space Comp.
O(n + m + k)
Readability
6/10
"The code utilizes `std::set` to store integer elements and efficiently find the intersection of two sets. The `std::set_intersection` algorithm is used to compute the intersection, making `Hash Map / Hash Set` and `Ordered Map / Ordered Set` the most relevant tags."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #2 | 100 | 8/20/2024 |
| Try #1 | 100 | 8/20/2024 |