Nan-Do commited on
Commit
b58ec89
1 Parent(s): aa7ffc9

Update README.md

Browse files

Updated formatting.

Files changed (1) hide show
  1. README.md +8 -8
README.md CHANGED
@@ -215,13 +215,13 @@ Only one valid answer exists.
215
  Certainly, here is one potential way to implement a function in Python 3 that effectively solves the problem.
216
  '''python
217
  class Solution:
218
- def twoSum(self, A: List[int], T: int) -> List[int]:
219
- ans = []
220
- for x in range(len(A)-1):
221
- if A[x]+A[x+1] == T:
222
- ans.append(x)
223
- else:
224
- ans.append(x+1)
225
- return ans
226
  '''
227
  ```
 
215
  Certainly, here is one potential way to implement a function in Python 3 that effectively solves the problem.
216
  '''python
217
  class Solution:
218
+ def twoSum(self, A: List[int], T: int) -> List[int]:
219
+ ans = []
220
+ for x in range(len(A)-1):
221
+ if A[x]+A[x+1] == T:
222
+ ans.append(x)
223
+ else:
224
+ ans.append(x+1)
225
+ return ans
226
  '''
227
  ```