2014年2月1日

面试准备 - C# 版本的树状数组

摘要: 树状数组 计算 任意连续N个值的和的时间复杂度为Log(n) 修改也是Log(n)而普通数组修改是O(1) 计算和是O(n)具体定义可以看这里:http://zh.wikipedia.org/zh-cn/%E6%A0%91%E7%8A%B6%E6%95%B0%E7%BB%84或者看这个Blog:http://dongxicheng.org/structure/binary_indexed_tree/这东西刚刚好可以解决 编程之美里面的 1.7光影切割问题using System;using System.Collections.Generic;using System.Linq;using S 阅读全文

posted @ 2014-02-01 19:41 听说读写 阅读(590) 评论(0) 推荐(0) 编辑

导航