File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ export const mobiusFunction = (number) => {
2828 return primeFactorsArray . length !== new Set ( primeFactorsArray ) . size
2929 ? 0
3030 : primeFactorsArray . length % 2 === 0
31- ? 1
32- : - 1
31+ ? 1
32+ : - 1
3333}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ const rowEchelon = (matrix) => {
117117 let result = matrix
118118
119119 // Iterate through the rows (i) and columns (j) of the matrix.
120- for ( let i = 0 , j = 0 ; i < numRows && j < numCols ; ) {
120+ for ( let i = 0 , j = 0 ; i < numRows && j < numCols ; ) {
121121 // If the current column has all zero elements below the current row,
122122 // move to the next column.
123123 if ( ! checkNonZero ( i , j , result ) ) {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export function largeSum(bignum) {
1313 let num = 0
1414
1515 while ( pos -- ) {
16- for ( let i = nums . length ; i -- ; ) {
16+ for ( let i = nums . length ; i -- ; ) {
1717 num += + nums [ i ] . charAt ( pos )
1818 }
1919 ret = ( num % 10 ) + ret
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export const Guid = () => {
88 const pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
99 let currentDateMilliseconds = new Date ( ) . getTime ( )
1010 return pattern . replace ( / [ x y ] / g, ( currentChar ) => {
11- const randomChar = ( currentDateMilliseconds + Math . random ( ) * 16 ) % 16 | 0
11+ const randomChar = ( ( currentDateMilliseconds + Math . random ( ) * 16 ) % 16 ) | 0
1212 currentDateMilliseconds = Math . floor ( currentDateMilliseconds / 16 )
1313 return (
1414 currentChar === 'x' ? randomChar : ( randomChar & 0x7 ) | 0x8
You can’t perform that action at this time.
0 commit comments