自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 LeetCode:Palindrome Number

题目:Determine whether an integer is a palindrome.判断一整数是否为回文。思路:判断颠倒后的数与原来的数是否相等。代码:class Solution {public: bool isPalindrome(int x) { if(x < 0)return false; int sum = 0

2017-08-08 21:56:37 187

原创 LeetCode:String to Integer (atoi)

题目:Implement atoi to convert a string to an integer.将字符串转换为整数。思路:注意符号以及溢出的处理。代码:class Solution {public: int myAtoi(string str) { int number = 0,i = 0,sign = 1; while(s

2017-08-08 20:16:53 180

原创 LeetCode:Reverse Integer

题目:Reverse digits of an integer.反转整数思路:可与INT_MIN和INT_MAX比较判断溢出。代码:class Solution {public: int reverse(int x) { long long res = 0; while(x) { res = res*10 +

2017-08-05 21:37:24 167

原创 LeetCode:Longest Palindromic Substring

题目:Given a string s, find the longest palindromic substring ins. You may assume that the maximum length of s is 1000.Example: Input: "babad"Output: "bab"Note: "aba" is also a valid answer.

2017-08-05 20:51:02 166

原创 LeetCode:Median of Two Sorted Arrays

题目:There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1

2017-08-05 16:13:44 243

原创 LeetCode: Longest Substring Without Repeating Characters

题目:Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b",

2017-08-04 20:31:51 149

原创 LeetCode: Add Two Numbers

题目:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and ret

2017-08-04 19:57:35 161

原创 决策树(一):基本概念

1.什么是决策树

2017-08-03 16:14:06 1309

原创 《机器学习实战》k-近邻算法

本文是博主阅读《机器学习实战》后的笔记,包含对其中算法的理解及代码实现1.什么是k-近邻算法所谓K近邻算法,即是给定一个训练数据集,对新的输入实例,在训练数据集中找到与该实例最邻近的K个实例,这K个实例的多数属于某个类,就把该输入实例分类到这个类中。2.k-近邻算法的优缺点优点 :精度高、对异常值不敏感、无数据输入假定。缺点:计算复杂度高、空间复杂度高。适用数据范围:数值型

2017-08-03 10:47:28 286

原创 LeetCode two sum

two sumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not us

2017-06-03 11:29:13 213

原创 OpenCV中GC方法求视差图的实现

前段时间需要用到GC方法实现视差图,参考了http://blog.csdn.net/mailang2008/article/details/5873883的内容,试验之后发现还有一些需要注意的地方,记录下来方便以后查看1.影像的读取由于GC方法要求左右影像均是8位的灰度图像故读取影像时需要进行一次转换。//读取左右影像 IplImage* pImgleft = cvLoadIma

2017-03-31 20:52:24 8107 8

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除