Improvised the solution.
Improvised the solution.

In previous solution, we were creating a look-up for the  entire array which is not required.

RyanFehr/HackerRank,RyanFehr/HackerRank,RyanFehr/HackerRank,RyanFehr/HackerRank,RyanFehr/HackerRank