網頁

2026年4月6日 星期一

C++ unordered set PMR解Leetcode 874 Walking Robot Simulation


C++ unordered set PMR解Leetcode 874  Walking Robot Simulation
解Leetcode 874. Walking Robot Simulation因為constraints,只好用hashmap,C++ unordered_set是知名的慢,加上pmr可以快上幾倍 
------
Solving LeetCode 874, Walking Robot Simulation, requires using a hashmap due to constraints. C++'s unordered_set is notoriously slow; adding PMR can speed it up several times.