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

Tell me how symbol is different from variables?

1 Answers  


How do you remove nil values in array using ruby?

1 Answers  


How symbol is different from variables?

1 Answers  


Is ruby a dying language?

1 Answers  


Interpolation is a very important process in Ruby, comment.

1 Answers  


In Ruby code, often it is observed that coder uses a short hand form of using an expression like array.map(&:method_name) instead of array.map { |element| element.method_name }. How this trick actually works?

1 Answers  


Explain ruby class.

1 Answers  


Can method names be capitalized?

1 Answers  


How is an iterator handled in ruby?

1 Answers  


Who is the developer of Ruby?

1 Answers  


Explain while loop in ruby.

1 Answers  


What is the difference between calling super and calling super()?

1 Answers  


Categories