一起答
单选

类比二分搜索算法,设计k分搜索算法(k为大于2的整数)如下:首先检查n/k处(n为被搜索集合的元素个数)的元素是否等于要搜索的值,然后检查2n/k处的元素,……,这样,或者找到要搜索的元素,或者把集合缩小到原来的1/k;如果未找到要搜索的元素,则继续在得到的集合上进行k分搜索;如此进行,直到找到要搜索的元素或搜索失败。此k分搜索算法在最坏情况下搜索成功的时间复杂度为(57),在最好情况下搜索失败的时间复杂度为(58)。

  • A.O(logn)
  • B.O(nlogn)
  • C.O(logkn)
  • D.O(nlogkn)
参考答案
查看试卷详情
相关试题
  1. (79)

    • A.gain
    • B.gained
    • C.gains
    • D.gaining
  2. (78)

    • A.insiders
    • B.money
    • C.outsiders
    • D.warehouse
  3. (77)

    • A.close
    • B.closed
    • C.enclose
    • D.enclosed
  4. Soon, more of the information we receive via the Internet could come(71)in digital wrappers.

    Wrappers are made up(72)software code that's targeted to do specific things with the data(73)within them, such as helping to define queries for search engines. They also keep(74)from(75)access to that code.

    • A.package
    • B.packaged
    • C.packages
    • D.packaging
  5. (76)

    • A.of
    • B.off
    • C.on
    • D.out
  6. (73)

    • A.college
    • B.family
    • C.workshop
    • D.cottage
  7. (74)

    • A.plan
    • B.schedule
    • C.effort
    • D.product
  8. Developing reliable software on time and within(66)represents a difficult endeavor for many organizations.

    Usually business solutions have three main aspects: people,(67),and technology. The main reason for failing software projects has little to do with technology and tools, and much to do with lack of process(68). Experience has shown that introducing new technology and tools in an immature or undisciplined environment is likely to increase the chaos. CASE tools are not enough. "A fool with a tool is still a fool !"

    Structured method was the first wave of the software industry. This was the beginning of transforming software development from a"(69)industry" to mass production. Software process movement if the second wave in the software industry. The process maturity movement prepares the way for the third wave of the software industry :"software industrialization". Software development will become like an assembly and manufacturing process. A cfiticalenabling factor is adisciplined software engineering . process with predictable quality,(70)and functionality.

    • A.forecast
    • B.preparation
    • C.budget
    • D.economy
  9. (71)

    • A.process
    • B.skill
    • C.organization
    • D.interface
  10. (72)

    • A.law
    • B.discipline
    • C.plan
    • D.evaluation