Skip to content

binary_search docs should show how to insert something into an already-sorted list, while maintaining sort order #61684

Closed
@thomcc

Description

@thomcc

This isn't exactly hard to do, but it's completely possible to have an off-by-one error because of overthinking it, and it's a common enough use case that it seems worth showing off in a doctest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions