Implementation Using Array And Strings