相关疑难解决方法(0)

堆栈和堆的内容和位置是什么?

编程语言书籍解释了在堆栈上创建了值类型,并且在堆上创建了引用类型,而没有解释这两者是什么.我还没有看清楚这个问题.我理解堆栈是什么.但,

  • 它们在哪里和它们(物理上在真实计算机的记忆中)?
  • 它们在多大程度上受操作系统或语言运行时控制?
  • 它们的范围是什么?
  • 是什么决定了它们的大小?
  • 是什么让一个更快?

language-agnostic heap stack memory-management dynamic-memory-allocation

7847
推荐指数
27
解决办法
145万
查看次数

标准容器的复杂性保证是什么?

显然;-)标准容器提供某种形式的保证.

什么类型的保证以及不同类型的容器之间究竟有什么区别?

从工作的SGI页(约STL)我想出了这一点:

Container Types:
================
Container:
    Forward Container
        Reverse Container
            Random Access Container
    Sequence
        Front Insert Sequence
        Back  Insert Sequence
    Associative Container
        Simple   Associative Container
        Pair     Associative Container
        Sorted   Associative Container
        Multiple Associative Container

Container Types mapped to Standard Containers
=============================================

std::vector:    Sequence    Back        Sequence                    Forward/Reverse/Random Container
std::deque:     Sequence    Front/Back  Sequence                    Forward/Reverse/Random Container
std::list:      Sequence    Front/Back  Sequence                    Forward/Reverse Container
std::set:       Sorted/Simple/Unique    Associative Container       Forward Container
std::map:       Sorted/Pair/Unique      Associative Container       Forward Container
std::multiset:  Sorted/Simple/Multiple  Associative Container …
Run Code Online (Sandbox Code Playgroud)

c++ big-o containers stl

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