算法与数据结构Java工程师单选难度 3真题改编
1007. 序列{20, 23, 28, 41, 61, 31, 71, 76, 15, 30}构造为完全二叉树,完全二叉树再变为最小堆后,堆所对应的的中序遍历序列可能为()
练习本题 ›
编程语言单选难度 3真题改编 · 2023
1045. 以下 C++ 程序的输出结果的是()
#include <iostream>
#include <map>
#include <memory>
int main(int argc, const char * argv[]) {
std::map<int, std::shared_ptr<int>> map;
std::shared_ptr<int> value1 = std::make_shared<int>(1);
map[1] = value1;
std::shared_ptr<int> value2 = std::make_shared<int>(2);
value1.swap(value2);
printf("%d\n", *value1);
printf("%d\n", *value2);
auto value3 = map[1];
printf("%d\n", *value3);
return 0;
}
练习本题 ›