09 2020 档案
发表于 2020-09-13 21:13阅读:161评论:0推荐:0
摘要:322. Coin Change class Solution { public: int coinChange(vector<int>& coins, int amount) { //动态规划 // 最优解法 // 算出1-11每个数的组成需要的最少硬币数 int nums[amount+1];
阅读全文 »
发表于 2020-09-13 11:46阅读:443评论:0推荐:0
摘要:21. 合并两个有序链表 - Merge Two Sorted Lists 题目:https://leetcode.com/problems/merge-two-sorted-lists/ /** * Definition for singly-linked list. * struct ListN
阅读全文 »
发表于 2020-09-12 22:00阅读:1110评论:0推荐:0
摘要:347. Top K Frequent Elements class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { // hash map 储存frequency unordered_map<int,
阅读全文 »
发表于 2020-09-12 13:27阅读:186评论:0推荐:0
摘要:704. 二分查找 - Binary Search class Solution { public: int search(vector<int>& nums, int target) { int middle, left = 0; int right = nums.size()-1; while
阅读全文 »
发表于 2020-09-11 21:36阅读:324评论:0推荐:0
摘要:78. 子集 - Subsets 题目:https://leetcode.com/problems/subsets/ class Solution { public: vector<vector<int>> subsets(vector<int>& nums) { vector<vector<int
阅读全文 »
发表于 2020-09-11 17:26阅读:214评论:0推荐:0
摘要:方法一:Insertion Sort 1 class MedianFinder { 2 vector<int> store; // resize-able 3 public: 4 /** initialize your data structure here. */ 5 MedianFinder()
阅读全文 »
发表于 2020-09-10 15:58阅读:5425评论:2推荐:5
摘要:OpenGL Pipline - 渲染管线 顶点数据的输入: 送入到渲染管线的数据包括顶点坐标、纹理坐标、顶点法线和顶点颜色等顶点属性。需要在绘制指令中传递相对应的图元信息。常见的图元包括:点(GL_POINTS)、线(GL_LINES)、线条(GL_LINE_STRIP)、三角面(GL_TRIAN
阅读全文 »
发表于 2020-09-09 22:29阅读:201评论:0推荐:0
摘要:把本地已有文件上传GitHub 1. Initialize repository - 初始化Repo后, 此时会在相应的文件夹里初始化一个文件夹为 “A” 2. Linke remote repo - 设置远程Repo链接 (在GitHub已初始化一个Repo为前提) 3. 将本地的文件拖入之前初始
阅读全文 »