Skip to content

Any interest to boost::find_gap function? #122

Description

@denzor200
std::vector<int> nums = {6,7,8,10,11}; // lost 9
boost::find_gap(nums, 6); // will point to value 10 at index 3

This function is useful for validating sorted data that are expected to be consecutive integers, for example - packet ids that might be lost, unix timestamps in a video archive that might be sparsed, etc..

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions