查找整序列的第k大值往往采用快速查找法。然而此方法会破坏原序列,并且需要O(n)的时间复杂度。抑或使用二叉平衡树进行维护,此方法每次查找时间复杂度仅为O(logn)。然而此方法丢失了原序列的顺序信息,无法查找出某区间内的第k大值。 划分树的基本思想就是对于某个区间,把它划分成两个子区间,左边区间的数小于右边区间的数。查找的时候通过记录进入左子树的数的个数,确定下一个查找区间,最后范围缩小到1,就找到了。
Linux 源码树提供了一个驱动程序子目录,这个目录又进一步划分为各种支持设备,例如 Bluetooth、I2C、serial 等。
The Linux source tree provides a drivers subdirectory that is further divided by the various devices that are supported, such as Bluetooth, I2C, serial, and so on.
正如您可以看到的,树中的每一个项都被划分到列中。
As you can see, each item in the tree is divided into columns.
相比于使用盘符的文件系统,盘符将文件系统划分成一系列不同的树(一个盘符代表一个文件目录树),而Linux系统只有一个文件目录树(并没有分割文件系统)。
While drive letters split the file system into a series of different trees (one for each drive), Linux always has a single tree.
应用推荐