pat advance 1039 added, using map will exceed memory limit
pat advance 1039 using array initialized