Array manipulation: add a value to each of the array elements between two given indices This is a Hackerrank problem: https://www.hackerrank.com/challenges/crush/problem

You are given a list of size \$N\$, initialized with zeroes. You have
to perform \$M\$ operations on the list and output the maximum of
final values of all the \$N\$ elements in the list. For every
operation, you are given three integers \$a, b\$ and \$k\$ and you
have to add value to all the elements ranging from index \$a\$ to
\$b\$ (both inclusive).
Input Format
First line will contain two integers \$N\$ and \$M\$ separated by a
single space. Next \$M\$ lines will contain three integers \$a, b\$
and \$k\$ separated by a single space. Numbers in list are numbered
from \$1\$ to \$N\$.
Constraints
\$3 \leq N \leq 10^7\$
\$1\leq M \leq 2*10^5\$
\$1 \leq a \leq b \leq N\$
\$ 0 \leq k \leq 10^9\$
Output Format
A single line containing maximum value in the updated list.
Sample Input
5 3
1 2 100
2 5 100
3 4 100

Sample Output
200


My code:
def arrayManipulation(n, queries):
    nums = [0] * (n + 1)
    for q in queries:
        nums[q[0]-1] += q[2]
        nums[q[1]] -= q[2]
    current = 0
    max = 0
    for i in nums:
        current += i
        if current &gt; max: max = current
    return max

Is there any way to optimize this?
Nice implementation, it's already very efficient. Few suggestions:

Expand the variables in the for-loop from for q in queries to for a, b, k in queries. Given the problem description it's easier to read.
A better name for the variable current can be running_sum.
Avoid calling a variable max, since it's a built-in function in Python. An alternative name can be result.
If you change the name of the variable max then you can have result = max(result,running_sum).
As @hjpotter92 said, is better to add a description of your approach in the question, you will likely get more reviews. Few bullet points or some comments in the code is better than nothing.

Applying the suggestions:
def arrayManipulation(n, queries):
    nums = [0] * (n + 1)
    for a, b, k in queries:
        nums[a - 1] += k
        nums[b] -= k
    running_sum = 0
    result = 0
    for i in nums:
        running_sum += i
        result = max(result, running_sum)
    return result

It's already an efficient solution that runs in \$O(n+m)\$, so I wouldn't worry about performances. However, there is an alternative solution running in \$O(m*log(m))\$ in the Editorial of HackerRank.
I implemented it in Python:
def arrayManipulation(n, queries):
    indices = []
    for a, b, k in queries:
        indices.append((a, k))
        indices.append((b + 1, -k))
    indices.sort()
    running_sum = 0
    result = 0
    for _, k in indices:
        running_sum += k
        result = max(result, running_sum)
    return result

It's based on the fact that it's enough finding the running sum on the sorted indices.
FYI in the Editorial (or Discussion) section of HackerRank there are optimal solutions and detailed explanations.
Thanks to @superbrain for the corrections provided in the comments.