1 class Solution 2 { 3 public: 4 vector<int> searchRange(vector<int>& nums, int target) 5 { 6 auto it = find(nums.begin(),nums.end(),target); 7 if(it ...
分类:
编程语言 时间:
2020-03-17 19:31:11
阅读次数:
57
1、属性 //存储元素的数组 protected Object[] elementData; //存储元素的个数 protected int elementCount; //扩容时的增加量,大于0是增加capacityIncrement,否则增加两倍(默认两倍) protected int capa ...
分类:
其他好文 时间:
2020-03-17 18:00:49
阅读次数:
82
#include<iostream> #include<vector> using namespace std; bool _insert_single_video( std::vector<int>* all_tmp_res, const int insert_pos, int single_vi ...
分类:
编程语言 时间:
2020-03-16 21:39:57
阅读次数:
67
列表初始化 (1)C++98{}初始化 缺陷: 只能初始化内置类型 //C++98使用{}对数组初始化 int arr[] = {1,2,3}; int arr[4] = {1}; //但对于自定义类型会报错 vector<int> v{1,2,3,4}; (2)C++11内置类型列表初始化 {}之 ...
分类:
编程语言 时间:
2020-03-16 19:18:29
阅读次数:
82
link #include <iostream> #include <cstring> #include <vector> #include <unordered_map> #include <climits> # define LL long long using namespace std; v ...
分类:
其他好文 时间:
2020-03-16 18:59:04
阅读次数:
53
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node ...
分类:
其他好文 时间:
2020-03-16 17:35:43
阅读次数:
55
2020.3.9~2020.3.15 每周总结 一、本周ACM学习相关内容 十分认真,仔细,严谨的学习了DFS和BFS的内容(《挑战程序设计竞赛》) —— 4小时 十分认真,仔细,严谨的学习了列如vector和queue等及其函数(也算是上课学的吧) —— 3小时 二、题数与耗时 题数不带比赛的补题 ...
分类:
其他好文 时间:
2020-03-16 14:37:14
阅读次数:
59
迭代 /* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<N ...
分类:
其他好文 时间:
2020-03-16 13:07:10
阅读次数:
45
迭代 /*// Definition for a Node.class Node {public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node ...
分类:
其他好文 时间:
2020-03-16 12:44:47
阅读次数:
71
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node ...
分类:
其他好文 时间:
2020-03-16 12:43:55
阅读次数:
72