Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions