Skip to content

Commit

Permalink
1502
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Feb 7, 2022
1 parent daf4b9b commit ef39fe1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions E_1502_CanMakeArithmeticProgressionFromSequence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Solution:
def canMakeArithmeticProgression(self, arr: List[int]) -> bool:
arr.sort()
return len(set(arr[i]-arr[i-1] for i in range(1,len(arr)))) == 1

0 comments on commit ef39fe1

Please sign in to comment.