Skip to content

习题6.1有错误 #6

@sanbeichahegongheguo

Description

@sanbeichahegongheguo

Describe the bug
A clear and concise description of what the bug is.

Demos/gop_homework/ch6/homework/test6.1/main.go

func (i *IntSet) Len() int {
return len(i.words)
}

这里 len(i.words) 是 bits 的长度,而不是需要的长度。不知道你的测试是如何通过的。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions