Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Any interest to `boost::find_gap` function?

Open
#122 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
tooling

Research direction

The issue names no files, tests, or entry points in the Boost.Algorithm module. Start by reviewing the issue and the module's existing algorithm conventions; done requires an agreed API and behavior for finding a gap in sorted consecutive integers, with tests covering the stated example and relevant edge cases.

Written by the indexing model from the issue text.

Description

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..

Dominant language
C++
Stars
131
Forks
117
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/algorithm

All issues in boostorg/algorithm

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.