find

来自cppreference.com
跳转到: 导航, 搜索

语法:

    #include <set>
    iterator find( const key_type& key );
    const_iterator find( const key_type& key ) const;

如果set中存在指定的key,则 find() 函数返回指向该key的iterator,否则返回指向end的iterator。

find() 的 时间复杂度是 K * log(N).

个人工具
名字空间
操作
导航
工具箱
其他语言