Giter VIP home page Giter VIP logo

Comments (3)

Alinshans avatar Alinshans commented on May 10, 2024

@zxpgo
不是,upper_bound 是得到第一个大于value的迭代器,equal_range 的返回值,第一个就是第一个不小于value的元素,第二个是第一个大于value的元素,分别对应lower_bound和upper_bound。
https://en.cppreference.com/w/cpp/algorithm/upper_bound
https://en.cppreference.com/w/cpp/algorithm/equal_range

from mytinystl.

zxpgo avatar zxpgo commented on May 10, 2024

@Alinshans
image

那这个地方写错了吧,最后一个不小于value就是最后一个大于等于value的位置,里面包含了等于。而且最后一个会被理解错为最后一个大于等于value的值。

from mytinystl.

Alinshans avatar Alinshans commented on May 10, 2024

@zxpgo
emm 是的,以前可能没理解清楚写错了... 感谢指出 你可以提个PR或者我等会改

from mytinystl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.