Skip to content

Instantly share code, notes, and snippets.

const std = @import("std");
// debug switch to print all found anagrams
const print_all_results = false;
fn hashAnagram(word: []const u8) u64 {
var h = @as(u64, 1);
for (word) |c| {
const p = primes[c];
// std.debug.assert(p != 0);