2013年4月16日

写给即将入行的程序员的一封信

摘要: 首先,欢迎来到程序员的世界。在这个世界上,不是有很多人想创造软件并解决问题。你是一名hacker,属于那些愿意做一些有挑战性的事情的人。“当你不创造东西时,你只会根据自己的感觉而不是能力去看待问题。” – WhyTheLuckyStiff对于下面的文字你不必完全接受,所有这些来自一个其貌不扬的程序员。我喜欢把事情做到最好,而不是对原来的东西修修补补。仅仅是因为爱好开始做一些创新,这是一个很好的开始!如果你说“我要先学习一下再开始做”那么你永远不会真正开始。每个人都需要从某个地方开始,所以现在打开你的编辑器开始写代码吧。下面是一些很重要的建议,虽然有人并不认同,但我保证你看完我的分析以后会站在我 阅读全文

posted @ 2013-04-16 14:25 Step-BY-Step 阅读(116) 评论(0) 推荐(0) 编辑

Sum Root to Leaf Numbers

摘要: Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which represents the number123.Find the total sum of all root-to-leaf numbers.For example, 1 / \ 2 3The root-to-leaf path1->2represents the number12.T 阅读全文

posted @ 2013-04-16 14:14 Step-BY-Step 阅读(128) 评论(0) 推荐(0) 编辑

Palindrome Partitioning II 改进

摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs.For example, givens="aab",Return1since the palindrome partitioning["aa","b"]could be produced using 1 cut.维护两张表,一张一维的表是 阅读全文

posted @ 2013-04-16 12:45 Step-BY-Step 阅读(221) 评论(0) 推荐(0) 编辑

Palindrome Partitioning II

摘要: Given a strings, partitionssuch that every substring of thepartition is a palindrome.Return the minimum cutsneeded for a palindrome partitioning ofs.F... 阅读全文

posted @ 2013-04-16 07:35 Step-BY-Step 阅读(217) 评论(0) 推荐(0) 编辑

Reverse Integer

摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask... 阅读全文

posted @ 2013-04-16 04:15 Step-BY-Step 阅读(226) 评论(0) 推荐(0) 编辑

字符串的排列

摘要: 题目:输入一个字符串,打印出该字符串中字符的所有排列。例如输入字符串abc,则输出由字符a、b、c所能排列出来的所有字符串abc、acb、bac、bca、cab和cba。 1 public void putall(String s){ 2 StringBuffer ss = new StringBuffer(s); 3 int pointer = 0; 4 outputK(ss,pointer); 5 } 6 public void outputK(StringBuffer s, int pointer){ 7 ... 阅读全文

posted @ 2013-04-16 03:29 Step-BY-Step 阅读(141) 评论(0) 推荐(0) 编辑

导航