You are viewing a single comment's thread. Return to all comments →
can HashSet length be 26 instead of s.length()?
Yes, HashLength should be 26 for this question. Edited :)
That would still make the HashSet resize once after 19 elements due to the default loadFactor being 0.75.
Even works without giving hashset length . So doesn't need to give capacity .