Soledad Pérez Herrera

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Soledad Pérez Herrera - Presentation Transcript

    1. TABLAS HASH Soledad Pérez
    2. ¿Cómo implementar los elementos sin object?
      • Haciendo una interface hasheable que contenga un método getClave().
      • La clase mercancía ha de implementar dicha interfaz para poder usar el anterior método.
      • Por último en la tabla hash tendrá un array de haseables en lugar de comparables y en la función de dispersión del método insertar se usará el dispersion(elemento.getClave());.
    3. Función matemática que nos permita transformar la clave en un índice numérico para el array.
      • B = tamaño de la tabla hash
      • Cadena compuesta por caracteres [c0 c1 c2… cn-1]
      • [((C0*32)%B+c1*32)%B+….Cn-1)]
    4. Como gestionar las colisiones y como implementarlas en la tabla hash
      • La colisión se gestiona eligiendo otra celda por exploración lineal o bien por exploración cuadrática.
      • Void insertarCuadratica (Object clave, Object obj){
      • do{
      • celda=((Conversion(clave))+i^2)%B;
      • i++;
      • }while(a[celda].estaOcupada());
      • a[celda]=obj;
      • }

    + edi.dsaedi.dsa, 2 years ago

    custom

    435 views, 0 favs, 0 embeds more stats

    Segunda forma de implementar los elementos de la ta more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 435
      • 435 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories