SlideShare una empresa de Scribd logo
1 de 3
Tablas Hash
Sí, se puede usar pero hay que implementar el método hashcode().  Habrá que redefinir el método equals(), para poder comprobar que objetos iguales devuelvan el mismo hashcode. También es necesario porque objetos distintos pueden retornar el mismo hashcode. ¿Podemos utilizar Object para los elementos de la tabla hash?
Sirve para acceder a las posiciones de la tabla donde se va a insertar o a buscar un elemento.  Utilizamos la Regla de Horner : publicintdispersion(String cadena){ intaux=0; for(int i=0;i<cadena.length();i++) aux=(aux*32+cadena.charAt(i))%b; returnaux; } Función de dispersión.

Más contenido relacionado

La actualidad más candente

Tablas hash (Jimena Menéndez Arroyo)
Tablas hash (Jimena Menéndez Arroyo)Tablas hash (Jimena Menéndez Arroyo)
Tablas hash (Jimena Menéndez Arroyo)edi.euitio
 
Tabla Hash (Sergio González Amor)
Tabla Hash (Sergio González Amor)Tabla Hash (Sergio González Amor)
Tabla Hash (Sergio González Amor)edi.euitio
 
Tablas hash (Sergio Fernández Rodríguez)
Tablas hash (Sergio Fernández Rodríguez)Tablas hash (Sergio Fernández Rodríguez)
Tablas hash (Sergio Fernández Rodríguez)edi.euitio
 
Tablas hash (Aitor Alonso Álvarez)
Tablas hash (Aitor Alonso Álvarez)Tablas hash (Aitor Alonso Álvarez)
Tablas hash (Aitor Alonso Álvarez)edi.euitio
 
Ezequiel Barbón Fernández
Ezequiel Barbón FernándezEzequiel Barbón Fernández
Ezequiel Barbón Fernándezedi.euitio
 
Tablas hash
Tablas hashTablas hash
Tablas hashhazare84
 
Tablas hash
Tablas hashTablas hash
Tablas hashuo212558
 
Tablas Hash (Ana Argüelles Fonseca)
Tablas Hash (Ana Argüelles Fonseca)Tablas Hash (Ana Argüelles Fonseca)
Tablas Hash (Ana Argüelles Fonseca)edi.euitio
 
Tabla Hash ( Andrea Bedia Suarez )
Tabla Hash ( Andrea Bedia Suarez )Tabla Hash ( Andrea Bedia Suarez )
Tabla Hash ( Andrea Bedia Suarez )edi.euitio
 
Tabla Hash (Melisa Fernández Rubio)
Tabla Hash (Melisa Fernández Rubio)Tabla Hash (Melisa Fernández Rubio)
Tabla Hash (Melisa Fernández Rubio)edi.euitio
 
Tablas Hash (Patricia Hevia Teixeira)
Tablas Hash (Patricia Hevia Teixeira)Tablas Hash (Patricia Hevia Teixeira)
Tablas Hash (Patricia Hevia Teixeira)edi.euitio
 
Tabla Hash - (Jorge Suárez Rigal)
Tabla Hash - (Jorge Suárez Rigal)Tabla Hash - (Jorge Suárez Rigal)
Tabla Hash - (Jorge Suárez Rigal)edi.euitio
 
Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)
Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)
Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)edi.euitio
 
Tablas de dispersión
Tablas de dispersiónTablas de dispersión
Tablas de dispersiónsalomon
 
Tablas hash (Alfredo García Moreno)
Tablas hash (Alfredo García Moreno)Tablas hash (Alfredo García Moreno)
Tablas hash (Alfredo García Moreno)edi.euitio
 

La actualidad más candente (20)

Tablas hash (Jimena Menéndez Arroyo)
Tablas hash (Jimena Menéndez Arroyo)Tablas hash (Jimena Menéndez Arroyo)
Tablas hash (Jimena Menéndez Arroyo)
 
Tabla Hash (Sergio González Amor)
Tabla Hash (Sergio González Amor)Tabla Hash (Sergio González Amor)
Tabla Hash (Sergio González Amor)
 
Tablas hash (Sergio Fernández Rodríguez)
Tablas hash (Sergio Fernández Rodríguez)Tablas hash (Sergio Fernández Rodríguez)
Tablas hash (Sergio Fernández Rodríguez)
 
Tablas hash (Aitor Alonso Álvarez)
Tablas hash (Aitor Alonso Álvarez)Tablas hash (Aitor Alonso Álvarez)
Tablas hash (Aitor Alonso Álvarez)
 
Ezequiel Barbón Fernández
Ezequiel Barbón FernándezEzequiel Barbón Fernández
Ezequiel Barbón Fernández
 
Tablas hash
Tablas hashTablas hash
Tablas hash
 
Tablas hash
Tablas hashTablas hash
Tablas hash
 
Tablas Hash (Ana Argüelles Fonseca)
Tablas Hash (Ana Argüelles Fonseca)Tablas Hash (Ana Argüelles Fonseca)
Tablas Hash (Ana Argüelles Fonseca)
 
Hash table by kba
Hash table by kbaHash table by kba
Hash table by kba
 
Tabla Hash
Tabla HashTabla Hash
Tabla Hash
 
Tabla Hash ( Andrea Bedia Suarez )
Tabla Hash ( Andrea Bedia Suarez )Tabla Hash ( Andrea Bedia Suarez )
Tabla Hash ( Andrea Bedia Suarez )
 
Tabla hash
Tabla hashTabla hash
Tabla hash
 
Tabla Hash (Melisa Fernández Rubio)
Tabla Hash (Melisa Fernández Rubio)Tabla Hash (Melisa Fernández Rubio)
Tabla Hash (Melisa Fernández Rubio)
 
Tablas Hash (Patricia Hevia Teixeira)
Tablas Hash (Patricia Hevia Teixeira)Tablas Hash (Patricia Hevia Teixeira)
Tablas Hash (Patricia Hevia Teixeira)
 
Tabla Hash - (Jorge Suárez Rigal)
Tabla Hash - (Jorge Suárez Rigal)Tabla Hash - (Jorge Suárez Rigal)
Tabla Hash - (Jorge Suárez Rigal)
 
Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)
Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)
Tablas hash (Pablo Amado Rodríguez Fernández - Grupo L)
 
Tablas de dispersión
Tablas de dispersiónTablas de dispersión
Tablas de dispersión
 
Tablas hash (Alfredo García Moreno)
Tablas hash (Alfredo García Moreno)Tablas hash (Alfredo García Moreno)
Tablas hash (Alfredo García Moreno)
 
Tabla hash
Tabla hashTabla hash
Tabla hash
 
Tablas Hash
Tablas HashTablas Hash
Tablas Hash
 

Destacado

The Other C Word: What makes great content marketing great
The Other C Word: What makes great content marketing greatThe Other C Word: What makes great content marketing great
The Other C Word: What makes great content marketing greatVelocity Partners
 
7 Content Insights - Epic Content Marketing - Integrated Marketing Forum 2013
7 Content Insights - Epic Content Marketing - Integrated Marketing Forum 20137 Content Insights - Epic Content Marketing - Integrated Marketing Forum 2013
7 Content Insights - Epic Content Marketing - Integrated Marketing Forum 2013Joe Pulizzi
 
A Simple Content Marketing Org Chart
A Simple Content Marketing Org ChartA Simple Content Marketing Org Chart
A Simple Content Marketing Org ChartAnn Handley
 
The Content Marketing Imperative - NewsCred Content Summit Summit 9-18
The Content Marketing Imperative - NewsCred Content Summit Summit 9-18The Content Marketing Imperative - NewsCred Content Summit Summit 9-18
The Content Marketing Imperative - NewsCred Content Summit Summit 9-18Michael Brenner
 
Create a Content Marketing Strategy Your Customers will LOVE, in 7 Steps
Create a Content Marketing Strategy Your Customers will LOVE, in 7 StepsCreate a Content Marketing Strategy Your Customers will LOVE, in 7 Steps
Create a Content Marketing Strategy Your Customers will LOVE, in 7 StepsJay Baer
 
10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)
10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)
10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)Ethos3
 
Content Marketing in 15 Minutes a Day for Restaurants
Content Marketing in 15 Minutes a Day for RestaurantsContent Marketing in 15 Minutes a Day for Restaurants
Content Marketing in 15 Minutes a Day for RestaurantsAnn Handley
 
Craft the Perfect Posts for the "Big 3" Social Networks
Craft the Perfect Posts for the "Big 3" Social NetworksCraft the Perfect Posts for the "Big 3" Social Networks
Craft the Perfect Posts for the "Big 3" Social NetworksHubSpot
 
60 Content Predictions for 2015 by Content Marketing Institute
60 Content Predictions for 2015 by Content Marketing Institute60 Content Predictions for 2015 by Content Marketing Institute
60 Content Predictions for 2015 by Content Marketing InstituteContent Marketing Institute
 
SEO in 2015: How Search Has Changed & How Marketers' Tactics Must Shift
SEO in 2015: How Search Has Changed & How Marketers' Tactics Must ShiftSEO in 2015: How Search Has Changed & How Marketers' Tactics Must Shift
SEO in 2015: How Search Has Changed & How Marketers' Tactics Must ShiftRand Fishkin
 
How to Build SEO into Content Strategy
How to Build SEO into Content StrategyHow to Build SEO into Content Strategy
How to Build SEO into Content StrategyJonathon Colman
 
Digital Marketing Trends 2015
Digital Marketing Trends 2015Digital Marketing Trends 2015
Digital Marketing Trends 2015Dave Chaffey
 
7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenecEugene Cheng
 
Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Velocity Partners
 
Why Content Marketing Fails
Why Content Marketing FailsWhy Content Marketing Fails
Why Content Marketing FailsRand Fishkin
 

Destacado (19)

Apuntes radicales
Apuntes radicalesApuntes radicales
Apuntes radicales
 
The Other C Word: What makes great content marketing great
The Other C Word: What makes great content marketing greatThe Other C Word: What makes great content marketing great
The Other C Word: What makes great content marketing great
 
29 Content Marketing Secrets e-book
29 Content Marketing Secrets e-book29 Content Marketing Secrets e-book
29 Content Marketing Secrets e-book
 
7 Content Insights - Epic Content Marketing - Integrated Marketing Forum 2013
7 Content Insights - Epic Content Marketing - Integrated Marketing Forum 20137 Content Insights - Epic Content Marketing - Integrated Marketing Forum 2013
7 Content Insights - Epic Content Marketing - Integrated Marketing Forum 2013
 
A Simple Content Marketing Org Chart
A Simple Content Marketing Org ChartA Simple Content Marketing Org Chart
A Simple Content Marketing Org Chart
 
The Content Marketing Imperative - NewsCred Content Summit Summit 9-18
The Content Marketing Imperative - NewsCred Content Summit Summit 9-18The Content Marketing Imperative - NewsCred Content Summit Summit 9-18
The Content Marketing Imperative - NewsCred Content Summit Summit 9-18
 
Create a Content Marketing Strategy Your Customers will LOVE, in 7 Steps
Create a Content Marketing Strategy Your Customers will LOVE, in 7 StepsCreate a Content Marketing Strategy Your Customers will LOVE, in 7 Steps
Create a Content Marketing Strategy Your Customers will LOVE, in 7 Steps
 
10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)
10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)
10 Quick Content Marketing Tips (By DNN Software. Redesigned by Ethos3.)
 
A Content Strategy Roadmap
A Content Strategy RoadmapA Content Strategy Roadmap
A Content Strategy Roadmap
 
Content Marketing in 15 Minutes a Day for Restaurants
Content Marketing in 15 Minutes a Day for RestaurantsContent Marketing in 15 Minutes a Day for Restaurants
Content Marketing in 15 Minutes a Day for Restaurants
 
Craft the Perfect Posts for the "Big 3" Social Networks
Craft the Perfect Posts for the "Big 3" Social NetworksCraft the Perfect Posts for the "Big 3" Social Networks
Craft the Perfect Posts for the "Big 3" Social Networks
 
60 Content Predictions for 2015 by Content Marketing Institute
60 Content Predictions for 2015 by Content Marketing Institute60 Content Predictions for 2015 by Content Marketing Institute
60 Content Predictions for 2015 by Content Marketing Institute
 
SEO in 2015: How Search Has Changed & How Marketers' Tactics Must Shift
SEO in 2015: How Search Has Changed & How Marketers' Tactics Must ShiftSEO in 2015: How Search Has Changed & How Marketers' Tactics Must Shift
SEO in 2015: How Search Has Changed & How Marketers' Tactics Must Shift
 
Build. Better. Content!
Build. Better. Content!Build. Better. Content!
Build. Better. Content!
 
How to Build SEO into Content Strategy
How to Build SEO into Content StrategyHow to Build SEO into Content Strategy
How to Build SEO into Content Strategy
 
Digital Marketing Trends 2015
Digital Marketing Trends 2015Digital Marketing Trends 2015
Digital Marketing Trends 2015
 
7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec7 Tips to Beautiful PowerPoint by @itseugenec
7 Tips to Beautiful PowerPoint by @itseugenec
 
Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.Crap. The Content Marketing Deluge.
Crap. The Content Marketing Deluge.
 
Why Content Marketing Fails
Why Content Marketing FailsWhy Content Marketing Fails
Why Content Marketing Fails
 

Presentacion tablashash

  • 2. Sí, se puede usar pero hay que implementar el método hashcode(). Habrá que redefinir el método equals(), para poder comprobar que objetos iguales devuelvan el mismo hashcode. También es necesario porque objetos distintos pueden retornar el mismo hashcode. ¿Podemos utilizar Object para los elementos de la tabla hash?
  • 3. Sirve para acceder a las posiciones de la tabla donde se va a insertar o a buscar un elemento. Utilizamos la Regla de Horner : publicintdispersion(String cadena){ intaux=0; for(int i=0;i<cadena.length();i++) aux=(aux*32+cadena.charAt(i))%b; returnaux; } Función de dispersión.