上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
摘要: ```C++ #include #include using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution ... 阅读全文
posted @ 2018-08-21 19:30 一条图图犬 阅读(461) 评论(0) 推荐(0) 编辑
摘要: ```C++ include include using namespace std; class Solution { public: bool Find(int target, vector array) { int i = 0; int j = (int)array.size() 1; whi 阅读全文
posted @ 2018-08-21 17:20 一条图图犬 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 头文件 源文件 C++ include include include "AVLTreeNode.h" template AVLTree::AVLTree():mRoot(nullptr){} template AVLTree::~AVLTree() { destroy(mRoot); } / 获取 阅读全文
posted @ 2018-08-21 13:40 一条图图犬 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 头文件 源文件 C++ include "svd.h" void print_matrix(const vector & vec){ if(vec.empty()){ return; } for ( auto row: vec){ if(row.empty()){ return; } for ( a 阅读全文
posted @ 2018-08-20 15:55 一条图图犬 阅读(2180) 评论(0) 推荐(0) 编辑
摘要: 头文件: 源文件: C++ include "delaunay_triangulation.h" void show_a_image_mat(const Mat& img){ namedWindow("src_img", WINDOW_AUTOSIZE); imshow("src_img", img 阅读全文
posted @ 2018-08-17 15:30 一条图图犬 阅读(1785) 评论(0) 推荐(0) 编辑
摘要: 参考:https://blog.csdn.net/qing101hua/article/details/53228668 C++ include include include include define KDtreeSize 1000 define UL unsigned long using 阅读全文
posted @ 2018-08-14 16:03 一条图图犬 阅读(2389) 评论(2) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/Raymon Geng/p/5784290.html 阅读全文
posted @ 2018-08-13 17:47 一条图图犬 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/xudong bupt/p/3671972.html 在写一个类的时候,如果一个构造器是接收单个参数的,那么最好要加上explicit。 如果不加的话,该构造函数还会拥有类型转换的情形,造成混淆。 解决办法:该构造函数的声明前加上explicit 阅读全文
posted @ 2018-08-13 00:28 一条图图犬 阅读(4748) 评论(0) 推荐(0) 编辑
摘要: 参考:https://blog.csdn.net/liuchenjane/article/details/53046715 头文件 源文件 测试: C++ include include include include include include include "TreeNode.h" usi 阅读全文
posted @ 2018-08-12 14:25 一条图图犬 阅读(543) 评论(0) 推荐(0) 编辑
摘要: ```C++ include include include define UL unsigned long int using namespace std; // 后r个全是1的时候终止 bool hasDone(vector& index, int r){ for(auto i=index.si 阅读全文
posted @ 2018-08-11 21:06 一条图图犬 阅读(354) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页