Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hamming #127

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Add hamming #127

merged 2 commits into from
Aug 23, 2024

Conversation

BNAndras
Copy link
Member

Another #48in24 exercise featured in three weeks

@BNAndras BNAndras mentioned this pull request Aug 20, 2024
26 tasks
@@ -0,0 +1,22 @@
pub fn distance(strand1: ByteArray, strand2: ByteArray) -> u256 {
if strand1.len() != strand2.len() {
Copy link
Contributor

@0xNeshi 0xNeshi Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's a macro for if (condition) then panic!:

assert!(strand1.len() == strand2.len(), "strands must be of equal length");

@0xNeshi 0xNeshi merged commit 1bdaa2a into exercism:main Aug 23, 2024
5 checks passed
@BNAndras BNAndras deleted the add-hamming branch August 23, 2024 12:50
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.

2 participants