Commit e9071f4
Ensure K value in reverseK is at least 1
Passing 0 or a negative value for K does not cause errors, as the input
is an integer. However, this behavior may be confusing for users. To
improve clarity, enforce K to be an integer greater than or equal to 1
and return an error if the input is invalid.
Co-authored-by: Po-Ying Chiu <charlie910417@gmail.com>
Change-Id: I6741888f888523d00f83cd554fc1442e99120a641 parent aec0044 commit e9071f4
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
827 | | - | |
| 826 | + | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| |||
0 commit comments