Skip to content

两个数组的交集 - 空间复杂度有问题 #338

Description

@dogeeelin
Image

这道题说明的空间复杂度是O(1),但 res会储存一个长度为min(len(nums1), len(nums2))的列表,所以空间复杂度应该为O(n)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions