摘要:
const修饰符常常需要在c++中使用到,需要注意到他对于指针修饰的时候的不同区别。 #include<iostream> using namespace std; int main() { //1.const修饰指针 int a = 10; int b = 10; const int* p = & 阅读全文
摘要:
题目 传送门 设计一个找到数据流中第 k 大元素的类(class)。注意是排序后的第 k 大元素,不是第 k 个不同的元素。 请实现 KthLargest 类: KthLargest(int k, int[] nums) 使用整数 k 和整数流 nums 初始化对象。 int add(int val 阅读全文