Skip to content

Commit 1dc0e12

Browse files
committed
Update MultiplyAllOtherElementsExceptItselfInO(n)Time
1 parent d039d2c commit 1dc0e12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MultiplyAllOtherElementsExceptItselfInO(n)Time

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Source: http://www.careercup.com/question?id=5179916190482432
2222

2323
// maintain two arrays which can be done in O(n)
2424

25-
Put arr1[0]=1
25+
Put arr1[0]=1;
2626
arr2[arr2.length-1]=1;
2727

2828
arr1 = 1, 2, 6, 6 (arrays multiply each number with previous and current starting from 1 to (n-1))

0 commit comments

Comments
 (0)