Netguru interview question

Create two simple algorithms for hash and array.