Skip to content

Fix bugs in cycle_count and hash_map - #97

Open
xindubawukong wants to merge 1 commit into
cmuparlay:masterfrom
xindubawukong:fix
Open

Fix bugs in cycle_count and hash_map#97
xindubawukong wants to merge 1 commit into
cmuparlay:masterfrom
xindubawukong:fix

Conversation

@xindubawukong

Copy link
Copy Markdown

This PR fixes several bugs under parlay/examples,

cycle_count.h

  • Bug1: a fixed point of the permutation has degree (p<p) + (p<=p) == 1, so it never becomes a leaf and is dropped from the count.
  • Bug2: cycles whose randomly-drawn priorities are all tied have no leaf and are dropped too.

hash_map.h

  • Bug: find stops probing at any non-full slot, including tombstones, while insert stores keys past the tombstones — so a live key can become unfindable after an unrelated removal on its probe path.

@xindubawukong
xindubawukong deleted the fix branch August 2, 2026 08:48
@xindubawukong
xindubawukong restored the fix branch August 2, 2026 08:48
@xindubawukong xindubawukong reopened this Aug 2, 2026
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