Algorithm Designex07m2_15puzzle
15 Puzzle
b4b8fe30-e6f6-4cf9-8ae6-709f318e8f28.cppC++
1// Loading code...Selected Submission
100 / 100
0.239s
32876 KB
BFS/DFSGreedyDP
Time Comp.
O(16! * 16) in the worst case, but significantly reduced by the heuristic and memoization.
Space Comp.
O(16!) in the worst case, due to the memoization map storing visited states.
Readability
6/10
"The code implements a search algorithm to solve the 15-puzzle problem. It uses a priority queue to explore possible states, guided by a heuristic (Manhattan distance), which is a classic application of informed search, falling under the BFS/DFS umbrella. The use of memoization suggests a dynamic programming aspect to avoid revisiting states."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #48 | 100 | 4/22/2025 |
| Try #47 | 100 | 4/22/2025 |
| Try #46 | 100 | 4/22/2025 |
| Try #45 | 100 | 4/22/2025 |
| Try #44 | 100 | 4/22/2025 |
| Try #43 | 0 | 4/22/2025 |
| Try #42 | 100 | 4/22/2025 |
| Try #41 | 30 | 4/22/2025 |
| Try #40 | 30 | 4/22/2025 |
| Try #39 | 20 | 4/22/2025 |
| Try #38 | 0 | 4/22/2025 |
| Try #37 | 0 | 4/22/2025 |
| Try #36 | 0 | 4/19/2025 |
| Try #35 | 0 | 4/19/2025 |
| Try #34 | 100 | 4/19/2025 |
| Try #33 | 0 | 4/19/2025 |
| Try #32 | 0 | 4/19/2025 |
| Try #31 | 100 | 4/17/2025 |
| Try #30 | 100 | 4/17/2025 |
| Try #29 | 0 | 4/17/2025 |
| Try #28 | 100 | 4/16/2025 |
| Try #27 | 100 | 4/16/2025 |
| Try #26 | 40 | 4/16/2025 |
| Try #25 | 100 | 4/16/2025 |
| Try #24 | 100 | 4/16/2025 |
| Try #23 | 100 | 4/16/2025 |
| Try #22 | 0 | 4/16/2025 |
| Try #21 | 100 | 4/16/2025 |
| Try #20 | 100 | 4/16/2025 |
| Try #19 | 100 | 4/16/2025 |
| Try #18 | 100 | 4/16/2025 |
| Try #17 | 100 | 4/16/2025 |
| Try #16 | 90 | 4/16/2025 |
| Try #15 | 90 | 4/15/2025 |
| Try #14 | 100 | 4/15/2025 |
| Try #13 | 100 | 4/15/2025 |
| Try #12 | 100 | 4/15/2025 |
| Try #11 | 100 | 4/15/2025 |
| Try #10 | 0 | 4/15/2025 |
| Try #9 | 100 | 4/15/2025 |
| Try #8 | 0 | 4/15/2025 |
| Try #7 | 100 | 4/15/2025 |
| Try #6 | 30 | 4/15/2025 |
| Try #5 | 30 | 4/15/2025 |
| Try #4 | 30 | 4/15/2025 |
| Try #3 | 0 | 4/15/2025 |
| Try #2 | 10 | 4/15/2025 |
| Try #1 | 10 | 4/15/2025 |