摘要:problem 231-power-of-two solution1 class Solution { public: bool isPowerOfTwo(int n) { if(n==0) return false; while(n%2==0) { n /= 2; } return n==1; }
阅读全文
摘要:C++中vector容器的常用操作方法实例总结 参考 1. C++中vector容器的常用操作方法实例总结; 完
阅读全文
摘要:problem 226-invert-binary-tree code solution1-DFS /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode
阅读全文
摘要:re 1. Procrustes Analysis普氏分析法; 2. BigCowPeking; end
阅读全文
摘要:problem 225. Implement Stack using Queues code class MyStack { public: std::queue<int> myqueue; /** Initialize your data structure here. */ MyStack()
阅读全文
摘要:sdm re 1. CSDN_newbee; 2. SDM_pdf; 3. github; 4. author_homepage; 5. github-patrikhuber; 6. materials; 7. matlab_code; 8. Derive; 9. 106points; end
阅读全文
摘要:re: 1. 机器学习之特征归一化(normalization); 2. 详解特征归一化; 3. zhihu; 4. 最大最小标准化与Z-score标准化; End
阅读全文
摘要:参考 1. 图像不变性特征; 2. matlab实现; 3. HU矩和Zernike矩; 完
阅读全文
摘要:path 文件 Macros.h 即表示系统Eigen版本是3.2.92; 参考 1.CSDN博客; 完
阅读全文
摘要:前言 本文主要记录一些重要的计算机视觉会议和团队。 会议 1. CVPR ECCV ICCV FG 团队 1. https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/ 2.
阅读全文
摘要:problem 219. Contains Duplicate II solution1 class Solution { public: bool containsNearbyDuplicate(vector<int>& nums, int k) { for(int i=0; i<nums.siz
阅读全文
摘要:problem 217. Contains Duplicate solution1:暴力破解 class Solution { public: bool containsDuplicate(vector<int>& nums) { for(int i=0; i<nums.size(); i++) {
阅读全文
摘要:problem 206. Reverse Linked List code Iteration /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(i
阅读全文
摘要:http://www.cnblogs.com/life2refuel/p/5396538.html
阅读全文
摘要:problem 205-Isomorphic Strings code 需要注意的 参考 1. Leetcode_Isomorphic Strings; 完
阅读全文
摘要:problem 204. Count Primes 参考 1. CSDN大神; 2. CSDN; 3. Leetcode_CountPrimes; 完 2. CSDN; 3. Leetcode_CountPrimes; 完
阅读全文
摘要:203. Remove Linked List Elements code /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : va
阅读全文
摘要:problem 202. Happy Number code 1. Leetcode_Happy Number; 2. GrandYang_cnblogs;
阅读全文
摘要:problem 198. House Robber solution1: code solution2: code class Solution { public: int rob(vector<int>& nums) { if(nums.size()==0) return 0; if(nums.s
阅读全文
摘要:problem 191. Number of 1 Bits code solution2 依据二进制数据的性质,使用模板进行实现。 1. Leetcode_Number of 1 Bits;
阅读全文
摘要:problem 190. Reverse Bits solution1: class Solution { public: uint32_t reverseBits(uint32_t n) { uint32_t res = 0; for(int i=0; i<32; i++) { res = res
阅读全文
摘要:problem 189. Rotate Array solution1: 暴力破解法(Time Limit Exceeded) class Solution { public: void rotate(vector<int>& nums, int k) { int tmp, pre; for(int
阅读全文
摘要:problem 172. Factorial Trailing Zeroes 172. Factorial Trailing Zeroes code class Solution { public: int trailingZeroes(int n) { int ans = 0; while(n)
阅读全文
摘要:problem 171. Excel Sheet Column Number sum( (s[i]-'A'+1)*pow(26, i) ) code 1. Leetcode_Excel Sheet Column Number;
阅读全文
摘要:Gtk-WARNING **: cannot open display: :0.0 https://blog.csdn.net/Rong_Toa/article/details/80365932
阅读全文
摘要:169. Majority Element HashMap code class Solution { public: int majorityElement(vector<int>& nums) { unordered_map<int, int> counts; for(int i=0; i<nu
阅读全文
摘要:168. Excel Sheet Column Title code https://leetcode.com/problems/excel-sheet-column-title/description/
阅读全文
摘要:167. Two Sum II - Input array is sorted code class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { vector<int> res; int left
阅读全文
摘要:160. Intersection of Two Linked Lists code /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x)
阅读全文
摘要:155. Min Stack code class MinStack { private: stack<int> s1; stack<int> s2; public: /** initialize your data structure here. */ MinStack() { } void pu
阅读全文
摘要:1、TensorRT的需要的文件 需要的基本文件(不是必须的) 1>网络结构文件(deploy.prototxt) 2>训练的权重模型(net.caffemodel) TensorRT 2.0 EA版中的sampleMNISTAPI和TensorRT 1.0中的sampleMNISTGIE 几乎没有
阅读全文
摘要:problem 141. Linked List Cycle code 这道题是快慢指针的经典应用。只需要设两个指针,一个每次走一步的慢指针和一个每次走两步的快指针,如果链表里有环的话,两个指针最终肯定会相遇。实在是太巧妙了,要是我肯定想不出来。代码如下: 1.Leetcode_Linked Lis
阅读全文
摘要:运算法则 参考 1. http://www.cnblogs.com/danh/archive/2010/12/24/1915810.html 2. https://blog.csdn.net/gtkknd/article/details/52798337 3. https://blog.csdn.n
阅读全文
摘要:136. Single Number https://leetcode.com/problems/single-number/description/
阅读全文
摘要:problem 125. Valid Palindrome 参考 1. Leetcode_Valid Palindrome; 完
阅读全文
摘要:c++函数参数类型-引用、指针、值 https://www.cnblogs.com/lidabo/archive/2012/05/30/2525837.html
阅读全文
摘要:可以用ssh命令行方式登录。对方需要开启ssh服务。 SSH2是目前广泛使用的ssh版本,SSH协议是TCP协议,其占用的端口号是 22; 绝大多数Linux版本默认使用的SSH是openssh,通过 ssh -V 命令可以查看ssh的信息; SSH分为服务器端和客户端,对于服务器端,SSH是默认开
阅读全文
摘要:problem 122. Best Time to Buy and Sell Stock II 这道题由于可以无限次买入和卖出。我们都知道炒股想挣钱当然是低价买入高价抛出,那么这里我们只需要从第二天开始,如果当前价格比之前价格高,则把差值加入利润中,因为我们可以昨天买入,今日卖出,若明日价更高的话,
阅读全文
摘要:problem 121. Best Time to Buy and Sell Stock code class Solution { public: int maxProfit(vector<int>& prices) { int res = 0; for(int i=0; i<prices.siz
阅读全文
摘要:problem 119. Pascal's Triangle II code class Solution { public: vector<int> getRow(int rowIndex) { vector<int> res(rowIndex+1, 1); if(rowIndex<2) retu
阅读全文
摘要:problem 118. Pascal's Triangle code 注意数组的下标,以及数组的size。根据题意,其实可以确定数组的大小。 参考 1. leetcode_Pascal's Triangle; 完
阅读全文