摘要:
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... 阅读全文
posted @ 2014-11-21 19:48
kid551
阅读(263)
评论(0)
推荐(0)
摘要:
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.... 阅读全文
posted @ 2014-11-21 19:20
kid551
阅读(210)
评论(0)
推荐(0)
摘要:
Problem StatementImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangeme... 阅读全文
posted @ 2014-11-21 16:51
kid551
阅读(175)
评论(0)
推荐(0)
摘要:
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... 阅读全文
posted @ 2014-11-21 16:29
kid551
阅读(312)
评论(0)
推荐(0)
浙公网安备 33010602011771号