上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
摘要: 插入罗马数字 \newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral 1\relax}} 然后在正文里面就可以用\RNum{}来添加罗马数字了。如\RNum{1}. 阅读全文
posted @ 2018-10-11 22:28 narjaja 阅读(331) 评论(0) 推荐(0)
摘要: 转自 "带环链表得几个问题" 判断一个链表是否有环,如果有环,则返回入环的第一个节点,否则返回null 如果一个链表有环,遍历一个链表便永远不会到达null,否则必定会到达null。设置两个指针,刚开始都指向头节点,遍历时,一个指针每次前进一步,我们称之为慢指针,另一个每次前进两步,称之为快指针,这 阅读全文
posted @ 2018-10-09 20:54 narjaja 阅读(138) 评论(0) 推荐(0)
摘要: class Solution { public: / @param n: the nth @return: the nth sequence / string countAndSay(int n) { // write your code here string s = "1"; if (n==1) 阅读全文
posted @ 2018-09-14 20:08 narjaja 阅读(115) 评论(0) 推荐(0)
摘要: ` 阅读全文
posted @ 2018-09-14 13:55 narjaja 阅读(142) 评论(0) 推荐(0)
摘要: 转自 "[LeetCode] Maximum Depth of Binary Tree 二叉树的最大深度" 阅读全文
posted @ 2018-09-13 21:25 narjaja 阅读(122) 评论(0) 推荐(0)
摘要: 单项列表只能把后一个node中的所有数据copy到当前node再delete后一node。 阅读全文
posted @ 2018-09-13 21:10 narjaja 阅读(118) 评论(0) 推荐(0)
摘要: 转自 "[LeetCode] Poor Pigs 可怜的猪" There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the sam 阅读全文
posted @ 2018-09-13 20:19 narjaja 阅读(227) 评论(0) 推荐(0)
摘要: public class Solution { / @param s: the given string @param numRows: the number of rows @return: the string read line by line / public String convert( 阅读全文
posted @ 2018-09-13 14:10 narjaja 阅读(140) 评论(0) 推荐(0)
摘要: 转自 "median of two sorted arrays" 该方法的核心是将原问题转变成一个寻找第k小数的问题(假设两个原序列升序排列),这样中位数实际上是第(m+n)/2小的数。所以只要解决了第k小数的问题,原问题也得以解决。 首先假设数组A和B的元素个数都大于k/2,我们比较A[k/2 1 阅读全文
posted @ 2018-09-12 20:57 narjaja 阅读(196) 评论(0) 推荐(0)
摘要: cvtColor(image,gray_image,CV_BGR2GRAY); //转灰度 要引用头文件opencv/opencv.hpp cv::resize(cur_img, cur_resize, cv::Size(), 0.5, 0.5); //改变尺寸 //显示匹配图像 //#includ 阅读全文
posted @ 2018-09-04 15:21 narjaja 阅读(137) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页