Grand Yang

Results 26 comments of Grand Yang

> 题目贴错了 嗯嗯,已改正,多谢指出~(若发现了其他的也请指出哈)

> 有一种利用bit位的dp做法,感觉很不错, 只是现在这些case都很小, 体现不了它的优点, 但是其中的dp思想非常棒, 建议看一下, 补充一下这个帖子 求贴代码~

> Thanks for your solution I really appreciate it.I think is not constant space because of recursion. What do you think? Yes, I agree. I think probably there is no...

已添加,多谢指出~

> 解法一最后的if判断应该是res[i]=res[j] 已修改,多谢指出~

> I found that solution is very popular and helpful : https://www.youtube.com/watch?v=8xKMP0kTnvU Seems no difference than the proposed solution

这个步骤是混合排序的精髓所在,实际上这个寄存器的作用就是将 [start, end) 范围内的数字排好序先存到寄存器中,然后再覆盖原数组对应的位置

> 解法一会在数据量特别大时超时 已标记,多谢指出~

> > 这里就不证明了,博主也不会证明。明白了这条定理。 > > ### Simple proof > a % c == b % c a = mc + d; b = nc + d; a - b =...

> @grandyang I am so sorry, please correct my proof. > > ```diff > - a - b = mc + d - (nc + d) = (m + n)...