自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

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

原创 leetcode valid panlidrome

public class Solution { public boolean isPalindrome(String s) { // Start typing your Java solution below if(s.length() == 1 || s.length() == 0 ) return true; Strin

2013-10-02 11:29:37 793

转载 leetcode edit distance

public int minDistance(String word1, String word2) { // int rowNum = word1.length(); int colNum = word2.length(); int[][] dist = new int[rowNum + 1][colNum + 1]; for

2013-09-20 07:47:34 575

原创 Leetcode Climbing Stairs

public int climbStairs(int n) { // Start typing your Java solution below // DO NOT write main() function if(n == 0) return 0; if(n == 1) return 1; int[] arr = new

2013-09-12 04:51:08 676

原创 leetcode plus one

public int[] plusOne(int[] digits) { if(digits.length < 1) return null; String ans = ""; int resi = 0; for(int i = digits.length - 1; i>=0; i--) { int cu

2013-09-12 04:37:33 650

原创 leetcode add binary

public String addBinary(String a, String b) { // char resi = '0'; int lena = a.length(); int lenb = b.length(); int len = (lena > lenb ? lena : lenb) - 1; int i

2013-09-12 02:27:20 551

原创 leetcode merge two sorted list

public ListNode mergeTwoLists(ListNode l1, ListNode l2) { // Start typing your Java solution below // DO NOT write main() function ListNode ans = new ListNode(0); ListNode he

2013-09-11 08:30:26 435

原创 leetcode minimum path sum

DPMin[ i,  j] = Min( Min[i - 1][j] + grid[i][j], Min[i][j - 1] + grid[ i ][ j ]); public int minPathSum(int[][] grid) { // Start typing your Java solution below [[1]] //

2013-09-11 08:12:44 434

原创 leetcode length of last word

public class LastWordLength { public int lengthOfLastWord(String s) { // if(s == null || s.length() == 0 ) return 0; s = s.trim(); s = s.replaceAll("[ ]+", " ");

2013-08-13 05:47:46 440

原创 leetcode insert interval

Iterate the intervals list. Compare newInterval with each item in the list. If overlapping, update the item. Otherwise(no overlapping), add newInterval into list. Then delete duplicates or merge overl

2013-07-26 08:45:15 459

原创 leetcode merge intervals

import java.util.ArrayList;import java.util.Collections;import java.util.Comparator;class Interval { int start; int end; Interval() {start = 0; end = 0;} Interval(int s, int e) {start = s; end

2013-07-25 05:28:22 510

原创 leetcode Jump Game

/* Leetcode JumpGameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that posi

2013-07-20 08:26:53 471

原创 leetcode spiral matrix

public ArrayList spiralOrder(int[][] matrix) { // ArrayList result = new ArrayList(); if(matrix == null) return result; if(matrix.length < 1) return result;

2013-07-20 08:13:23 408

原创 leetcode maxSubArray

O(n) solutionpublic class MaxSubArray { public int maxSubArray(int[] A) { int sum = 0, curr = 0; int max = Integer.MIN_VALUE; for(curr = 0; curr < A.length; curr++) {

2013-07-18 02:14:50 508

原创 leetcode pow

public class Pow {// //recursive version// //stack overflow when n is large// public double pow(double x, int n) {// // if(n < 0) {// return 1.0/pow(x, -n);// }// /

2013-07-17 02:58:08 480

原创 leetcode anagrams

import java.util.ArrayList;import java.util.Arrays;import java.util.HashMap;/* * Given an array of strings, return all groups of strings that are anagrams. * Note: All inputs will be in lower-c

2013-07-16 08:34:35 446

原创 Leetcode Permutation II

Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[1,1,2], [1,2,1], and [2,1,1

2013-07-16 07:56:00 467

转载 Java Object, Json 转换

总目录索引: http://www.cnblogs.com/hoojo/archive/2011/04/27/2030264.htmlJackson:   http://blog.csdn.net/IBM_hoojo/article/details/6340762

2013-06-18 11:20:58 461

转载 Java XML Read

http://blog.csdn.net/smcwwh/article/details/7183869SAX: http://blog.csdn.net/lifaming15/article/details/1749695The entity "nbsp" was referenced, but not declared.http:/

2013-06-16 17:49:09 414

转载 Fibonaccci Heap

http://mindlee.net/2011/09/29/fibonacci-heaps/

2013-05-09 16:11:18 443

转载 LeetCode Combination Sum

Good Article:    http://blog.csdn.net/zyfo2/article/details/8592955

2013-05-05 07:18:09 467

转载 JSON java 读取

JSON eclipse 库文件及教程:http://json-lib.sourceforge.net/index.htmlJSON 的介绍 :  http://www.json.org/json-zh.html

2013-04-28 11:36:36 943

原创 Lucene 自定义score + pageRank

http://blog.sina.com.cn/s/blog_6cc084c90100oiy6.htmlhttp://blog.sina.com.cn/s/blog_6cc084c90100ojhr.html

2013-03-15 11:29:52 819

原创 CareerCup 16.3 Philosopher Dinner -- DeadLock, Synchronized

package CareerCup;import java.util.concurrent.locks.Lock;import java.util.concurrent.locks.ReentrantLock;class Chopstick { private Lock lock; Chopstick() { lock = new ReentrantLock(); } pub

2013-03-09 17:52:13 483

原创 CareerCup 14.6

Implement Circular Array/* * Career Cup 14.6 * */package CareerCup;import java.util.Iterator;public class CircularArray implements Iterable { private T items[]; private int head; p

2013-03-08 16:04:31 562

原创 CareerCup 5.7 & 13.1

CareerCup 5.7 Missing Number#include #include using namespace std;bool fetchBit(int num, int column) { if(column = 32) return -1; return ((num & (1 << (31 - column))) != 0 );}int findMis

2013-03-08 14:17:44 593

原创 CareerCup 4.1 & 4.3

CareerCup 4.1//============================================================================// Name : CareerCup41.cpp// Author : SK2// Version :// Copyright : Your copyright not

2013-03-08 14:14:40 601

原创 CareerCup2.5

//============================================================================// Name : Career25.cpp// Author : SK2// Version :// Copyright : Your copyright notice// Description

2013-03-08 14:13:16 495

转载 Hash_Map 详解

http://hi.baidu.com/yu_roc/item/bcf23a239a5425112a0f1c5a

2012-12-03 13:01:52 240

转载 OpenGL 入门

http://www.cppblog.com/doing5552/archive/2009/01/08/71532.htmlhttp://anony3721.blog.163.com/blog/static/51197420114215753871/http://blog.csdn.net/nauty_li/article/category/374761

2012-12-03 09:01:07 214

转载 SVD分解的理解

http://www.bfcat.com/index.php/2012/03/svd-tutorial/

2012-11-15 18:22:57 223

转载 Android之googleMap

http://www.cnblogs.com/zhangdongzi/archive/2012/01/13/2321754.html

2012-11-13 03:23:50 260

转载 C++ 复制文件的n种方法

见此牛人http://stackoverflow.com/questions/10195343/copy-a-file-in-an-sane-safe-and-efficient-way特别推荐使用c++的缓冲流 cdbuf()http://blog.csdn.net/sszgg2006/article/details/7469539http://blog.csdn.n

2012-10-30 15:06:10 2838

转载 卷积

http://www.codeforge.com/read/63343/%E4%BA%8C%E7%BB%B4%E5%8D%B7%E7%A7%AF%E8%BF%90%E7%AE%97%E4%B9%8BC%E8%AF%AD%E8%A8%80%E5%AE%9E%E7%8E%B0.txt__htmlhttp://hi.baidu.com/foolwish/item/92f40e4456d38f

2012-10-22 11:08:19 250

原创 Visual Computing

http://www.ics.uci.edu/~majumder/VC/CS211.htm

2012-10-16 23:01:31 393

转载 图像处理 卷积 Convolution

http://www.developer.com/java/other/article.php/3579206/Processing-Image-Pixels-Understanding-Image-Convolution-in-Java.htmhttp://www.developer.com/java/other/article.php/3484591/Convolution-a

2012-10-13 15:46:44 408

原创 USACO Home on the Range

参考USACO,使用的动态规划 http://www.nocow.cn/index.php/USACO/range代码/* ID: wangxin12 PROG: rangeLANG: C++ */#include #include #define MAX 253using namespace std;ofstream fo("range.out"

2012-10-02 13:05:40 355

转载 关于C++ const 的全面总结

http://blog.csdn.net/Eric_Jo/article/details/4138548    C++中的const关键字的用法非常灵活,而使用const将大大改善程序的健壮性,本人根据各方面查到的资料进行总结如下,期望对朋友们有所帮助。Const 是C++中常用的类型修饰符,常类型是指使用类型修饰符const说明的类型,常类型的变量或对象的值是不能被更新的。

2012-10-02 11:37:21 303

原创 USACO Camelot,难题

http://usacotraining.blogspot.com/2012/08/problem-333-camelot.htmlsomething about  github  http://blog.sina.com.cn/s/blog_4b55f6860100zzgp.html

2012-09-28 14:40:40 392

原创 USACO Shopping Offers, DP

无语致死,使用的最原始的五维DP,参考 http://www.cppblog.com/Ylemzy/articles/100170.html注意count数组里除了要加入 捆绑打折的商品信息,也要加入商品的单价/* ID: wangxin12 PROG: shopping LANG: C++ */#include #include using namespace st

2012-09-26 08:01:09 332

转载 如何利用LinkedIn 建立美国人脉

如何利用LinkedIn 建立美国人脉LinkedIn的强大之处,在此不容多说,股票价格的确能够反映公司的市场地位。在此,建议毕业前1年的Pacer(最好读完一个学期后)通过它找寻找工作并扩大自己的“能力圈”。百度名片对LinkedIn的解释:LinkedIn是一家面向商业客户的社交网络(SNS)服务网站,成立于2002年12月并于2003年启动。网站的目的是让注册用户维护

2012-09-22 13:47:07 1907

空空如也

空空如也

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

TA关注的人

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