forked fromTheAlgorithms/JavaScript
- Notifications
You must be signed in to change notification settings - Fork0
Commitc5a2566
bug: abs returns 0 on an empty array (TheAlgorithms#1473)
* bug: update edge case for empty array* bug: add edge case for empty arrays* feat: add test case for empty array---------Co-authored-by: Ridge Kimani <ridgekimani@gmail.com>1 parent52858f8 commitc5a2566
2 files changed
+3
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
|
0 commit comments
Comments
(0)