上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: 题目: Given an array of integers, how many three numbers can be found in the array, so that we can build an triangle whose three edges length is the thr 阅读全文
posted @ 2017-06-13 21:17 Vincent丶丶 阅读(750) 评论(0) 推荐(0)
摘要: 题目: For a given source string and a target string, you should output the first index(from 0) of target string in source string. If target does not exi 阅读全文
posted @ 2017-06-06 21:49 Vincent丶丶 阅读(216) 评论(0) 推荐(0)
摘要: 此次博客是转载某位博主的文章,不过现在找不到了,所以先声明一下。 先贴一段代码: 结果: 字符串常量OK 区别分析: 字符数组和字符串常量的区别,本质区别:前者在栈上分配空间,后者存储在静态存储区等。 这里 str_2是指针, 指向”Crazy2″这个字符串常量的内存首地址, 而str_1是在栈里分 阅读全文
posted @ 2017-06-05 20:13 Vincent丶丶 阅读(823) 评论(0) 推荐(0)
摘要: 1. 两种方式: 终端输出图像新窗口输出图像 2. 终端输出命令: %matplotlib inline 新窗口输出命令: %matplotlib qt5 注意此两个语句是命令行输入,若在spyder中此语句无效,需要到ipython窗口命令窗口中输入,而若是在juypter notebook中则可 阅读全文
posted @ 2017-06-05 19:48 Vincent丶丶 阅读(9477) 评论(0) 推荐(0)
摘要: 题目: Given an array of integers, the majority number is the number that occurs more than half of the size of the array. Find it. Notice You may assume 阅读全文
posted @ 2017-05-26 20:05 Vincent丶丶 阅读(259) 评论(0) 推荐(0)
摘要: calchist函数需要包含头文件 #include <opencv2/imgproc/imgproc.hpp> 函数声明(三个重载 calchist函数): 官方文档: The functions calcHist calculate the histogram of one or more ar 阅读全文
posted @ 2017-05-26 19:17 Vincent丶丶 阅读(3570) 评论(0) 推荐(0)
摘要: 题目: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). 阅读全文
posted @ 2017-05-26 09:18 Vincent丶丶 阅读(166) 评论(0) 推荐(0)
摘要: 实测,Ubuntu16.04,gcc 5.3.0&5.4.0(编译选项选择C++11和不选择新标准结果相同) 输出为 而同样的代码,在Windows下VS环境中, 输出为 这个就很奇怪了,只能取看具体操作情况了,下面是汇编文件,有空填坑(g++ -S ex.cpp生成汇编文件) 阅读全文
posted @ 2017-05-25 08:07 Vincent丶丶 阅读(527) 评论(0) 推荐(0)
摘要: 1. split() split()通过指定分隔符对字符串进行切片,如果参数num 有指定值,则仅分隔 num 个子字符串 split()方法语法:str.split(str="", num=string.count(str)).参数str -- 分隔符,默认为所有的空字符,包括空格、换行(\n)、 阅读全文
posted @ 2017-05-25 07:58 Vincent丶丶 阅读(252) 评论(0) 推荐(0)
摘要: 1.numpy.genfromtxt() numpy.genfromtxt() CSV文件很容易被numpy类库的genfromtxt方法解析 2. 阅读全文
posted @ 2017-05-25 07:56 Vincent丶丶 阅读(177) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页