Hi supriyoch_2008,
Try the below steps:
1. Create hash with first array element as key and second array element as value.
2. Sort the hash on the basis of its value in ascending order and print top 5 key , value pair.
3. Sort the hash on the basis of its value in descending order and print top 5 key , value pair.
Below link will provide all the required things on Hashes
Hash
In case you are stuck somewhere we are happy to help you.
Happy Programming....