Skip to content

Add solution for Challenge 21 by Kosench#1877

Merged
github-actions[bot] merged 1 commit into
RezaSi:mainfrom
Kosench:challenge-21-Kosench
Jul 9, 2026
Merged

Add solution for Challenge 21 by Kosench#1877
github-actions[bot] merged 1 commit into
RezaSi:mainfrom
Kosench:challenge-21-Kosench

Conversation

@Kosench

@Kosench Kosench commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Challenge 21 Solution

Submitted by: @Kosench
Challenge: Challenge 21

Description

This PR contains my solution for Challenge 21.

Changes

  • Added solution file to challenge-21/submissions/Kosench/solution-template.go

Testing

  • Solution passes all test cases
  • Code follows Go best practices

Thank you for reviewing my submission! 🚀

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 819dd5b3-f494-462c-9b73-ac0e592217df

📥 Commits

Reviewing files that changed from the base of the PR and between f5e7ce5 and 4641d6d.

📒 Files selected for processing (1)
  • challenge-21/submissions/Kosench/solution-template.go

Walkthrough

Adds a new Go solution file for Challenge 21 implementing iterative binary search, recursive binary search, and an insertion-position search function, along with a main function that demonstrates and prints results from each.

Changes

Binary Search Solution

Layer / File(s) Summary
Binary search implementations and demo
challenge-21/submissions/Kosench/solution-template.go
Adds BinarySearch, BinarySearchRecursive, and FindInsertPosition functions along with a main function that tests each against a sample sorted array.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • RezaSi/go-interview-practice#586: Adds the same three functions (BinarySearch, BinarySearchRecursive, FindInsertPosition) in a Challenge 21 solution-template.go with matching behavior.
  • RezaSi/go-interview-practice#626: Adds the same binary-search utility functions with identical signatures and behavior in a separate submission.
  • RezaSi/go-interview-practice#1554: Adds the same three Challenge 21 utilities with matching binary-search and insertion-position logic in a different submission file.

Poem

Hop, hop, through arrays sorted neat,
Left and right bounds, midpoint feet 🐰
Found or not, insert with grace,
Recursion bounces round the place,
A rabbit's search, both quick and sweet!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Kosench's Challenge 21 solution.
Description check ✅ Passed The description clearly matches the change by describing the Challenge 21 solution file and testing claims.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions
github-actions Bot merged commit 974678d into RezaSi:main Jul 9, 2026
6 checks passed
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

🎉 Auto-merged!

This PR was automatically merged after 2 days with all checks passing.

Thank you for your contribution, @Kosench!

📊 Scoreboards and badges will be updated shortly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant