Algorithm Designa64_q4_closest_subset
Closest Subset
83dca4de-a9da-4bb0-b83c-0bc282b2043b.cppC++
1// Loading code...Selected Submission
0 / 100
0.003s
1764 KB
BacktrackBFS/DFS
Time Comp.
O(2^seller)
Space Comp.
O(seller)
Readability
6/10
"The code uses a depth-first search (DFS) to explore different combinations of sellers to acquire a complete set of books at the minimum cost. The core logic revolves around recursively trying to include or exclude each seller and updating the global minimum price."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #13 | 0 | 5/1/2025 |
| Try #12 | 100 | 5/1/2025 |
| Try #11 | 100 | 5/1/2025 |
| Try #10 | 100 | 5/1/2025 |
| Try #9 | 100 | 5/1/2025 |
| Try #8 | 60 | 5/1/2025 |
| Try #7 | 50 | 5/1/2025 |
| Try #6 | 100 | 4/20/2025 |
| Try #5 | 100 | 4/20/2025 |
| Try #4 | 50 | 4/20/2025 |
| Try #3 | 60 | 4/20/2025 |
| Try #2 | 0 | 4/20/2025 |
| Try #1 | 50 | 4/20/2025 |