zoukankan      html  css  js  c++  java
  • STL: inplace_merge

    inplace_merge

    Combines the elements from two consecutive sorted ranges into a single sorted range, where the ordering criterion may be specified by a binary predicate.

    template<class BidirectionalIterator>
       void inplace_merge(
          BidirectionalIterator _First, 
          BidirectionalIterator _Middle,
          BidirectionalIterator _Last
       );
    template<class BidirectionalIterator, class Predicate>
       void inplace_merge(
          BidirectionalIterator _First, 
          BidirectionalIterator _Middle,
          BidirectionalIterator _Last,
          Predicate _Comp
       );

    注,The complexity depends on the available memory as the algorithm allocates memory to a temporary buffer. If sufficient memory is available, the best case is linear with ( _Last – _First) – 1 comparisons; if no auxiliary memory is available, the worst case is Nlog (N), where N = ( _Last – _First).

  • 相关阅读:
    Python3之json文件操作
    Python3之MySQL操作
    使用requests模块的网络编程
    Python 判断小数的函数
    python之函数
    CPUID
    .inc
    probe,victim,
    coolcode
    Linux vim 常用方法
  • 原文地址:https://www.cnblogs.com/freewater/p/2954232.html
Copyright © 2011-2022 走看看