Skip to content

x/website: incorrect time complexity #58982

@mkraft

Description

@mkraft

URL: https://go.dev/doc/effective_go#interfaces

The method (Sequence).String is mistakenly said to have a quadratic time complexity but it's actually linear, or O(N).

Relevant quotes:

Loop is O(N²); will fix that in next example.

and

It also has complexity O(N²), which is poor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions