<img width="1375" height="661" alt="Image" src="https://github.com/user-attachments/assets/6fb512fd-5edf-4c25-869c-fceb28860d9e" /> 这道题说明的空间复杂度是O(1),但 res会储存一个长度为min(len(nums1), len(nums2))的列表,所以空间复杂度应该为O(n)
这道题说明的空间复杂度是O(1),但 res会储存一个长度为min(len(nums1), len(nums2))的列表,所以空间复杂度应该为O(n)