Layman's approach in Python


#1

class Solution:
** def coverPoints(self, A, B):**
** count = 0**
** for i in range(len(A)-1):**
** p = A[i+1]-A[i]**
** q = B[i+1]-B[i]**
** if (abs§ > abs(q)):**
** count = count + abs§**
** if (abs§ < abs(q)):**
** count = count + abs(q)**
** if (abs§ == abs(q)):**
** count = count + abs§**
**** return countComment body goes here.