Skip to content

Commit a0fe736

Browse files
committed
Update the space complexity comment
1 parent 4329671 commit a0fe736

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/sean/array/MissingPositiveFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void swap(int[] nums, int i, int j) {
6868
nums[j] = t;
6969
}
7070

71-
public int firstMissingPositive0(int[] nums) { // O(N) time | O(1) space
71+
public int firstMissingPositive0(int[] nums) { // O(N) time | O(N) space
7272
if (nums == null || nums.length == 0) return 1;
7373

7474
Set<Integer> set = new HashSet<>();

0 commit comments

Comments
 (0)