- 博客(26)
- 收藏
- 关注
转载 常用资源整理
本人常用资源整理(ing...) Deep Learning(深度学习):ufldl的2个教程(这个没得说,入门绝对的好教程,Ng的,逻辑清晰有练习):一ufldl的2个教程(这个没得说,入门绝对的好教程,Ng的,逻辑清晰有练习):二Bengio团队的deep learning教程,用的theano库,主要是rbm系列,搞python的可以参考,很不错。deeplear
2016-03-31 15:05:22 1373
转载 一步一图一代码,一定要让你真正彻底明白红黑树
一步一图一代码,一定要让你真正彻底明白红黑树 作者:July 二零一一年一月九日-----------------------------本文参考:I、 The Art of Computer Programming Volume III、 Introduction to Algorithms, Second EditionIII、The Annotate
2016-03-30 10:27:08 281
原创 leetcode155.MinStack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Ge
2016-03-29 11:22:23 273
原创 leetcode125.ValidPalindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a
2016-03-29 10:45:55 318
转载 浅谈strtok函数的使用心得
经常使用strtok函数进行文本操作,其实他是一个很好用的函数,很方便,能够简单的实现一行文本的切分操作,总结一下使用心得。函数原型char* strtok(char* s,const char* delim)首先strtok有两个参数,第一个参数是要操作的数据的地址或称为指针,通常是通过fget(buff,length(buff),p)函数来获取的,这里buff就是char* s,本人经
2016-03-28 21:18:31 294
转载 strncmp函数
函数原型:extern int strcmp(char *str1,char * str2,int n)参数说明:str1为第一个要比较的字符串,str2为第二个要比较的字符串,n为指定的str1与str2的比较的字符数。 所在库名:#include 函数功能:比较字符串str1和str2的前n个字符。 返回说明:返回整数值:当str1str2时
2016-03-28 21:17:25 339
原创 leetcode119.Pascal'sTriangleII
Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?第一种方法就是直
2016-03-27 22:52:34 296
原创 leetcode118. Pascal's Triangle
Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]其实是求杨辉三角的算法,可以看出每一行的数据是上
2016-03-27 22:08:08 275
转载 当指针指向一个字符串
1. 以字符串形式出现的,编译器都会为该字符串自动添加一个0作为结束符。如在代码中写"abc",那么编译器帮你存储的是"abc\0"。2. "abc"是常量吗?答案是有时是、有时不是。不是常量的情况:"abc"作为字符数组初始值的时候就不是,如:char str[] = "abc";因为定义的是一个字符数组,所以就相当于定义了一些空间
2016-03-27 20:38:31 1544 1
原创 leetcode112.PathSum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum
2016-03-17 22:08:55 325
原创 leetcode111.MinimumDepthofBinary Tree
Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.解题思路:采用递归的方法来解决这个问题,其实递归可以解决的问题都可以
2016-03-17 21:06:16 332
转载 反向迭代器(rbegin,rend)
C++ primer (中文版第四版)第273页9.3.2 begin和end成员 begin和end操作产生指向容器内第一个元素和最后一个元素的下一个位置的迭代器,如下所示。这两个迭代器通常用于标记包含容器中所有元素的迭代范围。c.begin() 返回一个迭代器,它指向容器c的第一个元素c.end() 返回一个迭代器,它指向容器c的最后一个元素的下一
2016-03-17 20:47:38 216
原创 leetcode107.Binary Tree Level Order Traversal II
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).For example:Given binary tree {3,9,20,#,#,15,7},
2016-03-17 20:15:10 280
原创 leetcode102.BinaryTreeLevelOrderTraversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20
2016-03-16 11:17:18 287
转载 关于/dev/null及用途
把/dev/null看作"黑洞". 它非常等价于一个只写文件. 所有写入它的内容都会永远丢失. 而尝试从它那儿读取内容则什么也读不到. 然而,/dev/null对命令行和脚本都非常的有用.禁止标准输出.1 cat $filename >/dev/null 2 # 文件内容丢失,而不会输出到标准输出.禁止标准错误 1 rm $badname
2016-03-12 15:24:17 288
转载 Linux 下SVN 命令行的使用
方法一、用shell脚本定时更新项目1、进入网站的根目录,假设项目位置放在/var/www/testcd /var/www/test2、建立脚本文件update.sh,分两步进行.首先利用touch命令创建,之后使用vim进行编辑.touch update.shvim update.sh输入以下内容#!/bin/shwhile tru
2016-03-12 13:42:55 373
转载 递归树求解递归算法的时间复杂度
递归算法时间复杂度的计算方程式一个递归方程: 在引入递归树之前可以考虑一个例子: T(n) = 2T(n/2) + n2 迭代2次可以得: T(n) = n2 + 2(2T(n/4) + (n/2) 2) 还可以继续迭代,将其完全展开可得: T(n) = n2 + 2((n/2) 2 + 2((n/22)2 + 2((n/23
2016-03-11 11:18:43 807
原创 leetcode101.SymmetricTree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the f
2016-03-10 22:30:10 367
原创 leetcode88.MergeSortedArray
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold add
2016-03-09 22:49:36 270
原创 leetcode83.RemoveDuplicatesFromSortedList
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.解题思路: 有顺序的单链表的删除。如果存在
2016-03-09 22:14:52 342
原创 实习一周总结
转眼间实习一周多了,感觉这周很累,但是收获不少,从实验室走出来,实习后发现自己需要学习的东西太多,在学校学到的东西跟工程上做的区别还是不小的,说白了,继续加油吧,渐渐适应了工作的节奏,加油
2016-03-09 21:15:46 724
转载 图像处理:基础(模板、卷积运算)
1.使用模板处理图像相关概念: 模板:矩阵方块,其数学含义是一种卷积运算。 卷积运算:可看作是加权求和的过程,使用到的图像区域中的每个像素分别于卷积核(权矩阵)的每个元素对应相 乘,所有乘积之和作为区域中心像素的新值。 卷积核:卷积时使用到的权用一个矩阵表示,该矩阵与使用的图像区域大小相同,其行、列都是奇数,
2016-03-09 14:39:51 466
转载 linux 学习路线图
(一)基本的LINUX安装,系统维护知识。 建议初期学习ubuntu 会基本命令。会写简单的shell脚本。会使用GNOME环境下的一些基本的程序和工具。熟练使用apt,dpkg,ssh学会使用man学会配置samba了解和熟悉Linux系统的一些习惯性的设计理念和习惯。了解Linux的目录结构,及其用途。/proc /etc /tmp /sys /va
2016-03-08 17:55:52 421
转载 动态规划:从新手到专家
作者:Hawstein出处:http://hawstein.com/posts/dp-novice-to-advanced.html声明:本文采用以下协议进行授权: 自由转载-非商用-非衍生-保持署名|Creative Commons BY-NC-ND 3.0 ,转载请注明作者及出处。前言本文翻译自TopCoder上的一篇文章: Dynamic Programming:
2016-03-06 11:41:49 251
原创 研究生毕业前要完成的事
一:书单1.编程珠玑2.c++ prime plus3. 剑指offer4. 深入理解计算机系统5. 机器学习实战6. 编程之美二:掌握的知识1.OpenGL2.Python3.Qt4.常用的游戏引擎三:精通的知识1.c++2.数据结构(手写常用的算法)3.算法四:关注的网站1.ACM之家2.刷leetcode3.何海涛:
2016-03-06 11:35:03 638
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人