24.11.2014 Views

Profa. Dra. Ana Paula Appel - CEUNES

Profa. Dra. Ana Paula Appel - CEUNES

Profa. Dra. Ana Paula Appel - CEUNES

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Funções hash <br />

• Exemplo com string: mesmo raciocínio: Seja B um<br />

arranjo de 13 elementos:<br />

o LOWEL = 76 79 87 69 76,<br />

o L+O+W+E+L = 387,<br />

o h(LOWEL) = 387 % 13 = 10.<br />

• Qual a idéia por trás da função hash que usa o<br />

resto?<br />

o Os elementos sempre caem no intervalo entre 0 e n 1<br />

• Outras funções hash? Como você trataria colisões?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!