摘要:
A fast method to determine the number is odd or even:total & 0x1 //true, if total is oddtotal & 0x1 //false, if total is evenProblem StatementThere ar... 阅读全文
摘要:
Let'sbegin witha naive method.We first need to sort the array A[n]. And we want to solve the problem by iterating through A from beginning and ending.... 阅读全文
摘要:
Problem StatementImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangeme... 阅读全文
摘要:
The maximum product of sub-arrays in $[1, n]$ can be divided by 3 cases:A[n] is the maximum product of all sub-arrays in [1, n].The array which has th... 阅读全文