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

AttemptPoints Time
Try #481004/22/2025
Try #471004/22/2025
Try #461004/22/2025
Try #451004/22/2025
Try #441004/22/2025
Try #4304/22/2025
Try #421004/22/2025
Try #41304/22/2025
Try #40304/22/2025
Try #39204/22/2025
Try #3804/22/2025
Try #3704/22/2025
Try #3604/19/2025
Try #3504/19/2025
Try #341004/19/2025
Try #3304/19/2025
Try #3204/19/2025
Try #311004/17/2025
Try #301004/17/2025
Try #2904/17/2025
Try #281004/16/2025
Try #271004/16/2025
Try #26404/16/2025
Try #251004/16/2025
Try #241004/16/2025
Try #231004/16/2025
Try #2204/16/2025
Try #211004/16/2025
Try #201004/16/2025
Try #191004/16/2025
Try #181004/16/2025
Try #171004/16/2025
Try #16904/16/2025
Try #15904/15/2025
Try #141004/15/2025
Try #131004/15/2025
Try #121004/15/2025
Try #111004/15/2025
Try #1004/15/2025
Try #91004/15/2025
Try #804/15/2025
Try #71004/15/2025
Try #6304/15/2025
Try #5304/15/2025
Try #4304/15/2025
Try #304/15/2025
Try #2104/15/2025
Try #1104/15/2025