小编Per*_*rge的帖子

为什么要排序字符串O(n log n)?

可能重复:
Big O的简单英文解释

在编程难题的答案中,它表示对字符串进行排序需要O(n log n)时间.这是怎么衍生出来的?

是否有人为Big O资源提供了良好的参考链接.

谢谢

algorithm big-o

13
推荐指数
2
解决办法
2万
查看次数

为什么C++ auto_ptr有两个复制构造函数和两个赋值运算符但只有一个默认构造函数?

为什么需要两种形式?谢谢

    explicit auto_ptr (T* ptr = 0) throw() 

    auto_ptr (auto_ptr& rhs) throw() 

    template<class Y>
    auto_ptr (auto_ptr<Y>& rhs) throw() 

    auto_ptr& operator= (auto_ptr& rhs) throw()

    template<class Y>
    auto_ptr& operator= (auto_ptr<Y>& rhs) throw()
Run Code Online (Sandbox Code Playgroud)

c++ stl

7
推荐指数
2
解决办法
748
查看次数

当你移位到变量的末尾时会发生什么?

如果你有一些变量(在堆栈上),你左或右位移超过它的结束会发生什么?

byte x = 1;
x >> N;
Run Code Online (Sandbox Code Playgroud)

如果x是一个指向内存转换为字节的指针而你做同样的事情怎么办?

byte* x = obtain pointer from somewhere;
*x = 1;
*x >> N;
Run Code Online (Sandbox Code Playgroud)

c c++ bit-manipulation

3
推荐指数
2
解决办法
4445
查看次数

标签 统计

c++ ×2

algorithm ×1

big-o ×1

bit-manipulation ×1

c ×1

stl ×1