Arrays: Left Rotation

  • + 0 comments

    JavaScript

    let newArr = a.slice(d)
    newArr = [...newArr,...a.slice(0,d)]
    return newArr