自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

世界是兔子的

图像处理,统计,编程

  • 博客(26)
  • 收藏
  • 关注

原创 LeetCode[97]::Interleaving String C++

Given s1, s2, s3, find whether s3 is formed by the interleaving ofs1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return true.When s3 = "aadbbbaccc", return

2015-08-22 23:40:00 865

原创 LeetCode[91]::Decode Ways C++

A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total number

2015-08-22 22:47:21 914

原创 LeetCode[85]::Maximal Rectangle C++

Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.class Solution {public:    int maximalRectangle(vector>& matrix) {     

2015-08-22 20:45:14 613

翻译 C# GetHashCode in the IEqualityComparer<T> in .NET

http://stackoverflow.com/questions/4095395/whats-the-role-of-gethashcode-in-the-iequalitycomparert-in-net?rq=1问题:为什么会IEqualityComparer同时存在Equals和GetHashCode两种方法,两者有什么区别?或者说,为什么Equals方法不足以满足判断等价的

2015-06-28 13:22:13 799

转载 设计模式:行为模式:职责链(chain of responsibility)

Chain of ResponsibilityChain-of-responsibility pattern is a design pattern consisting of a series of processing objects.For example, Filter/ColorMatch/RedEye/Rotator are the processing obj

2015-05-01 11:32:03 503

转载 设计模式:导论和背景知识

http://www.bogotobogo.com/DesignPatterns/introduction.phpDesign PatternsDesign patterns are classified as three groups.Creational PatternsAbstract Factory - Provide an interf

2015-05-01 11:32:02 1477

转载 设计模式:结构型模式:适配器(adapter)

http://www.codeproject.com/Tips/595716/Adapter-Design-Pattern-in-CplusplusUsing the CodeAn adapter pattern converts the interface of a class into another interface the clients expect. Adap

2015-04-28 21:00:44 469

原创 算法:数组 C++

题目来自于http://zhedahht.blog.163.com/blog/#m=0&t=1&c=fks_081075092084086069082074084070080087080066083082非常感谢何海涛 July大神和众网友。本博文初衷是为了方便自己准备面试,有一篇文章可以看所有的东西,省的翻来翻去。代码是手打的Qt C++,解法中不考虑实现最简单的毫无难度

2015-04-07 21:21:25 587

原创 数据结构:栈 C++

题目来自于http://zhedahht.blog.163.com/blog/#m=0&t=1&c=fks_081075092084086069084074084070080087080066083082非常感谢何海涛,July大神和众网友。本博文初衷是为了方便自己准备面试,有一篇文章可以看所有的东西,省的翻来翻去。代码是手打的Qt C++,解法中不考虑实现最简单的毫无难度

2015-04-05 16:40:53 835

原创 数据结构:链表 C++

// 微软100题:09 链表中倒数第k个结点[数据结构]// 题目:输入一个单向链表,输出该链表中倒数第k个结点。链表的倒数第0个结点为链表的尾指针。// 链表结点定义如下:// struct ListNode// {// int m_nKey;// ListNode* m_pNext;// };#include #include #inclu

2015-04-04 17:11:58 2202 1

原创 数据结构:字符串 C++

题目来自于https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/01.00.md非常感谢July大神和众网友。本博文初衷是为了方便自己准备面试,有一篇文章可以看所有的东西,省的翻来翻去。代码是手打的Qt C++,解法中不考虑实现最简单的毫无难度的暴力解法了。因为

2015-04-03 16:37:55 1386

原创 设计模式:创建型模式:建造模式(Builder Pattern)

本文是下面文章的剪辑,深表感谢:1)Builder模式的误区:将复杂对象的构建进行封装,就是Builder模式了吗? http://www.cnblogs.com/happyhippy/archive/2010/09/01/1814287.html2)深入浅出设计模式 by AI923)Example of `builder' design pattern in C++  https:

2015-03-28 18:24:31 774

原创 设计模式:创建型模式:原型模式(prototype pattern)

本文的内容是综合下面几篇文章,深表感谢:1)http://www.cppblog.com/converse/archive/2006/07/21/10307.html2)http://www.jellythink.com/archives/3783)http://www.jellythink.com/archives/105什么是原型模式:原型模式就是你有一个对象,而且

2015-03-27 18:20:32 523

原创 设计模式:创建型模式:单例模式(singleton pattern)

下面的内容主要来自于了1)深入浅出设计模式 by AI922)http://www.jellythink.com/archives/82 (这篇讲的特别深)单例模式的目的:保证一个类有且仅有一个对象,并提供一个访问这个对象的全局访问点。通常单例模式适合用于表示具有唯一性的对象,比如文件系统、资源管理器等。单例模式的实现方法:为了限制创建对象的个数,而且要

2015-03-26 05:51:31 583 1

原创 设计模式:创建型模式:工厂模式(factory pattern)

本文基于整理综合下面两文,深表感谢:1)设计模式精解-GoF 23 种设计模式解析附 C++实现源码 http://ccftp.scu.edu.cn:8090/Download/038c70a8-c724-4b86-91c3-74b927b1d492.pdf2)设计模式C++实现(1)---工厂模式 http://blog.csdn.net/wuzhekai1985/article/det

2015-03-26 02:12:36 687

原创 编程艺术::交替字符串 C++语言

题目和分析来自于https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/05.04.md题目描述输入三个字符串s1、s2和s3,判断第三个字符串s3是否由前两个字符串s1和s2交错而成,即不改变s1和s2中各个字符原有的相对顺序,例如当s1 = “aabcc”,s2 =

2015-03-15 03:10:39 765

原创 LeetCode::Binary Search Tree Iterator

题目Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next

2015-03-12 17:54:26 462

原创 LeetCode::Merge Sorted Array C++语言

问题Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal to m +n) to hold additional element

2015-03-12 15:39:27 438

转载 教你透彻了解红黑树

https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/03.01.md教你透彻了解红黑树二叉查找树由于红黑树本质上就是一棵二叉查找树,所以在了解红黑树之前,咱们先来看下二叉查找树。二叉查找树(Binary Search Tree),也称有序二叉树(ord

2015-03-11 19:39:06 2795

原创 四种常见的基于比较的排序算法C++

下面的代码包括了四种常见的排序算法:归并排序(merge sort)快速排序(quick sort)大根堆排序(max root heap sort)和插入排序(insertion sort)#include#define ARRAY_SIZE 15using namespace std;typedef struct _node{ int value_;

2015-03-11 04:31:20 713 1

原创 【整理】关于C/C++语言面试题问答

准备找工作ing,题目不是我自己遇到的,都是网上整理来的,所以标注转载。答案可能自己加工过,尽量保证正确全面,欢迎大家阅读后指正指点指教!只涉及C C++两种语言,数据结构和算法另外单开一贴。第一大类:指针和内存空间Q: 指针和引用的区别A: 1)指针指向第二大类:关键词和宏定义第三大类:类、面向对象

2015-03-09 14:36:54 532

原创 LeetCode::Rotate Array C语言

题目Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to[5,6,7,1,2,3,4]. Note:Try to come up as many solutions a

2015-03-08 01:18:25 727 1

原创 LeetCode::Zigzag Conversion C语言

题目The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L

2015-03-07 22:36:11 1833

原创 LeetCode::Reverse Integer C语言

题目Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before c

2015-03-07 21:00:20 2600 1

原创 LeetCode::Two Sum C语言

题目Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target,

2015-03-07 15:39:19 9851 2

翻译 如何(高效)判断数据是否线性可分

很多机器学习分类算法,比如支持向量机(SVM),的介绍都说了假设数据要是线性可分。如果数据不是线性可分的,我们就必须要采用一些特殊的方法,比如SVM的核技巧把数据转换到更高的维度上,在那个高维空间数据更可能是线性可分的(Cover定理)。现在的问题是,如何判断数据是线性可分的?最简单的情况是数据向量是一维二维或者三维的,我们可以把图像画出来,直观上就能看出来。比如Håvar

2015-03-05 12:51:09 26892

空空如也

空空如也

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

TA关注的人

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