Solutions for Special type of musical instrument

    • @JavierVow
    • @jacob, submitted in Python 2, achived 100% score
    # Complete the rotLeft function below.
    def solve(a, d):
        return a[d:] + a[:d]
    
    
    • @JavierVow
    • @jacob, submitted in JavaScript, achived 44% score
    function solve(a, d) {
        const headIndex = d % a.length
        const head = a.splice(0, headIndex)
        a.push(...head)
        return a // passes test 9 as it modifies initial array
    }
    
    • @JavierVow
    • @jacob, submitted in Python 2, achived 100% score
    # Complete the rotLeft function below.
    def solve(a, d):
        return a[d:] + a[:d]
    
    
    • @JavierVow
    • @jacob, submitted in Python 2, achived 0% score
    def solve(arr, a):
        # your code here
        return