Implementation Using Array