The hash() is an inbuilt method in Ruby returns the hash-code of the matrix.
Parameters: The function does not accepts any parameter.
Return Value: It returns the hash-code of the matrix.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.