Skip to content

数组去重算法bug #21

Description

@PYW1

调用RemoveDuplicatesAndEmpty函数,结果中有两个相同的数据

if (i > 1 && a[i-1] == a[i]) || len(a[i]) == 0
应该改为
if (i >= 1 && a[i-1] == a[i]) || len(a[i]) == 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions