Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Tell us how would you implement hash in ruby internally?



Tell us how would you implement hash in ruby internally?..

Answer / Vishwa Natri

The internal implementation of a Hash in Ruby is based on a Hash table (an array of linked lists). When a new key-value pair is added, the key is hashed using the SHA256 digest algorithm. The resulting integer value is used as an index to access the appropriate bucket within the array. If multiple keys have the same hash value, they are stored in a linked list.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

What is a symbol in ruby?

1 Answers  


Explain about Class variable and global variable?

1 Answers  


Tell me what does ruby name refers to?

1 Answers  


Explain the difference in scope for these two variables: @@name and @name?

1 Answers  


What is sysread method in Ruby?

1 Answers  


mention what is the difference between a single quote and double quote?

1 Answers  


What's the difference in scope for these two variables: @name and @@name?

1 Answers  


Tell me how you define instance variable, global variable and class variable in ruby?

1 Answers  


Explain about the command line options?

1 Answers  


What is mvc and why do we use it?

1 Answers  


Tell me what is the role of sub-directory app/controllers and app/helpers?

1 Answers  


Explain ruby strings.

1 Answers  


Categories