自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (1)
  • 收藏
  • 关注

原创 [leetcode] #89 Gray Code

题目 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequen

2015-05-18 15:49:17 693

原创 [软件安装] libsvm for matlabR2012b on Mac OSX 10.9

课程要用Libsvm,本来打算用Python来装,但老师给了Matlab程序,自己又懒,不想重写代码,就打算装在Matlab上。真没想到一下午就全用来安这个东西了。Matlab以及OSX版本matlab用的是MatlabR2012b for mac OSX是Mac OS X 10.9.5各种错误的艰辛历程libsvm里自带了Windows下面Matlab的二进制代码libsvmread.mexw6

2015-05-16 16:17:22 1715

原创 矩阵卷积的快速算法

悲剧的面试上周二去面试一家公司,好几个问题上都卡住了。原先刷的都是算法、数据结构上的问题。简历上写的课程上的知识几乎全忘了(本身也没兴趣),结果面试官按着简历上的课程问,悲剧了。题目一个M×N的矩阵A,以及一个K×K的矩阵B,对两个矩阵做卷积运算,复杂度为多少?有没有快速运算?思路如果考虑暴力法,那复杂度显然是O(MNK2)O(MNK^2)。快速算法当时一直在往动态规划上套,死活想不出来,%>_<%

2015-05-16 13:41:33 6378 2

原创 [leetcode] #3 Longest Substring Without Repeating Characters

题目 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3.

2015-05-11 20:27:13 655

原创 固体物理基础

第十一周能量在E−E+dEE-E+dE之间的电子数(浓度): dN=f(E)N(E)dEdN=f(E)N(E)dE电流密度 j=nqv=σE(一维)j=nqv=\sigma E (一维)电导率 σ0=nqu(u=qτm∗)\sigma_0=nqu \quad (u=\frac{q\tau}{m^*})本征激发 n=p=(N−N+)1/2exp(−Eg/2kBT)=nin0p0

2015-05-11 10:23:51 975

原创 [leetcode] #143 Reorder List

题目 Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes’ values. For example, Given {1,2,3,4}, re

2015-05-10 11:53:59 714

原创 [实习] 2015/4/22 腾讯暑期实习招聘

这个月准备了大半个月来找各种实习,申了阿里、腾讯、华为,阿里4月2号笔试就挂了(也不知道为什么……),腾讯昨天刚完了一面(真的是完了),华为27号才有活动(鬼知道是什么活动……)。 结果都很不理想,就写上一篇来记录一下自己这第一次失败。为以后积累些经验教训。

2015-04-22 10:36:08 876

原创 [leetcode] #41 First Missing Positive

题目 First Missing Positive Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm s

2015-04-22 09:50:22 772

原创 [leetcode] #2 Add Two Numbers

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

2015-04-15 00:20:44 625

原创 二叉树的各种遍历方法

二叉树的遍历方法

2015-04-11 16:11:44 697

原创 [leetcode] #25 Recover Binary Search Tree

1. 题目 Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty straight forward. Co

2015-04-11 00:20:36 724

原创 [leetcode] #129 Sum Root to Leaf Numbers

1.题目 Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find

2015-04-10 15:49:45 667

原创 [leetcode] #50 Pow(x,n)

1.题目Implement pow(x, n).也就是要求实现幂的计算。2.蛮力法首先想到的当然是蛮力法,直接乘它个n次:double myPow(double x, int n) { for (int i=0;i<n;i++) { x*=x; } return x;}但显然这题当然没那么简单,直接蛮力后果如下: 看来是有时间复杂度要求限制的,蛮力

2015-04-10 00:43:50 796

原创 [leetcode] #70 Climbing Stairs

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?题目大概意思是有n级台阶,每次可以爬2级或者1级,问总共

2015-04-09 22:23:12 712

原创 [leetcode] #4 Median of Two Sorted Array

There are two sorted arrays A and B 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)).题目要求是找到两个已排序的序列A和B的中位数(如果m+

2015-04-09 15:20:01 745

原创 [leetcode] #162 Find Peak Element

从今天起把刷的leetcode题放这里。

2015-04-09 15:00:53 690

计算机组成与设计硬-软件接口英文版第4版

计算机组成与设计 硬-软件接口 英文版 第4版 ARM版

2015-04-16

空空如也

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

TA关注的人

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