Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int buscarIndice(String nome) {
- int i = hashCode(nome);
- while(!alunos[i].nome.equals(nome)){
- int soma = calcularValor(nome);
- i = doubleHash(soma, i);
- }
- return i;
- }
- public void inserir(String nome,int nota){
- int i = hashCode(nome);
- while(alunos[i] != null){
- alunos[i].colisoes++;
- int k = calcularValor(nome);
- i = doubleHash(k, i);
- }
- alunos[i] = new Aluno(nome,nota);
- }
Add Comment
Please, Sign In to add comment