09 2020 档案

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

点击右上角即可分享
微信分享提示