daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public int buscarIndice(String nome) {
  2.  
  3.         int i = hashCode(nome);
  4.         while(!alunos[i].nome.equals(nome)){
  5.             int soma = calcularValor(nome);
  6.             i = doubleHash(soma, i);
  7.         }
  8.         return i;
  9.     }
  10.  
  11. public void inserir(String nome,int nota){
  12.  
  13.         int i = hashCode(nome);
  14.  
  15.         while(alunos[i] != null){
  16.             alunos[i].colisoes++;
  17.             int k = calcularValor(nome);
  18.             i = doubleHash(k, i);
  19.  
  20.         }
  21.         alunos[i] = new Aluno(nome,nota);
  22.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top