摘要: 发现了一个很棒的vim配置方法,现在共享给大家。https://github.com/kepbod/ivimivim - The Vim Distribution of Xiao-Ou ZhangSee ivim's states on GitEgoInstallationManual InstallA Vim/MacVim/gVim with version higher than 7.3 has been installed on your computer, and back up your origin vim stuff;Install Vundle to install a 阅读全文
posted @ 2014-03-29 00:49 Eason Liu 阅读(576) 评论(0) 推荐(0) 编辑
摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.Notes:It is intended for this problem to be specified vaguely (ie, no given input specs). You are respo 阅读全文
posted @ 2014-03-28 22:06 Eason Liu 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 解决方法:以管理员权限打开/usr/bin/dia ,做如下修改#dia-gnome --integrated "$@"dia-gnome "$@" 阅读全文
posted @ 2014-03-28 21:12 Eason Liu 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2014-03-28 19:22 Eason Liu 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="aadbbbaccc", return false.动态规划,类似于求最长公共子序列。 1 class Solution { 2 public: 3 bool isInterleave(string s1, string 阅读全文
posted @ 2014-03-28 16:30 Eason Liu 阅读(794) 评论(1) 推荐(0) 编辑
摘要: Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.没什么好说的,了解原理即可,使用递归。 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNo... 阅读全文
posted @ 2014-03-28 14:43 Eason Liu 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 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 nu... 阅读全文
posted @ 2014-03-28 14:38 Eason Liu 阅读(182) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文
posted @ 2014-03-28 14:34 Eason Liu 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What constitutes a word?A sequence of non-space characters constitutes a word.Could the input string contain leading o 阅读全文
posted @ 2014-03-28 14:31 Eason Liu 阅读(361) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2014-03-28 14:27 Eason Liu 阅读(130) 评论(0) 推荐(0) 编辑