Icon

Earthcomputer's Website

Java HashSet Visualizer

Operations

Output =>
Code (JavaScript) equals(a, b)
return a === b;

hashCode(a)
let h = 0; for (let i = 0; i < a.length; i++) h = (Math.imul(31, h) + a.charCodeAt(i)) | 0; return h;


compareTo(a, b)
return a < b ? -1 : a > b ? 1 : 0;