Cses Problem Set Array Methods In Typescript