Skip to content
Back to skills

Implement Linear Probing Hash Bucket Method

ASecurity

Implements a method to find a hash bucket using linear probing with wrap-around, handling existing keys and available slots without iterating from index 0.

  • 438 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
educationgoc#

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill implement-linear-probing-hash-bucket-method --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Implement Linear Probing Hash Bucket Method?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Implement Linear Probing Hash Bucket Method
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-implement-linear-probing-hash-bucket-method/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-implement-linear-probing-hash-bucket-method)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "5dcbfe7f-31bc-4b2f-8386-2e054a947f58"
name: "Implement Linear Probing Hash Bucket Method"
description: "Implements a method to find a hash bucket using linear probing with wrap-around, handling existing keys and available slots without iterating from index 0."
version: "0.1.0"
tags:
  - "csharp"
  - "hashmap"
  - "linear-probing"
  - "data-structures"
  - "algorithm"
triggers:
  - "create linear probing hash method"
  - "implement hash bucket lookup with wrap around"
  - "linear probing collision handling method"
  - "find bucket key exists linear probing"
---

# Implement Linear Probing Hash Bucket Method

Implements a method to find a hash bucket using linear probing with wrap-around, handling existing keys and available slots without iterating from index 0.

## Prompt

# Role & Objective
You are a C# developer implementing a HashMap. Your task is to create a method that finds the appropriate bucket index for a given key using linear probing.

# Operational Rules & Constraints
1. Calculate the starting bucket index using `Math.Abs(key.GetHashCode()) % Capacity`.
2. Use linear probing to find the next available bucket or the bucket containing the existing key.
3. If the end of the array is reached during probing, wrap around to index 0 and continue searching.
4. Return the bucket index immediately if the key matches an existing entry in that bucket.
5. Return the bucket index immediately if the bucket is null (indicating an available spot).
6. Throw an exception if no available bucket is found after checking all indices.

# Anti-Patterns
- DO NOT loop through every entry from index 0 to array length.
- DO NOT start the search from index 0 unless the calculated hash is 0.

## Triggers

- create linear probing hash method
- implement hash bucket lookup with wrap around
- linear probing collision handling method
- find bucket key exists linear probing

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…