上一页 1 ··· 5 6 7 8 9

2015年11月10日

摘要: Add BinaryGiven two binary strings, return their sum (also a binary string).Examplea = 11b = 1Return 100solution:比较两个string的长度,将长读较小的string左边用0补齐。设置进位... 阅读全文
posted @ 2015-11-10 03:24 一心一念 阅读(130) 评论(0) 推荐(0) 编辑

2015年11月7日

摘要: ProblemGiven an input string, reverse the string word by word.For example, Given s = "the sky is blue", return "blue is sky the".ClarificationWhat con... 阅读全文
posted @ 2015-11-07 03:43 一心一念 阅读(118) 评论(0) 推荐(0) 编辑
摘要: *本文为摘抄笔记*Preface当程序需要对String对象进行许多改变时会用到StringBuilder类。因为字符串和String对象都是不可改变的,而StringBuilder对象则是易变的。String类不可变,就意味着每次对象进行改变时都需要创建一个新的对象副本。如果在创建长的字符串,或者... 阅读全文
posted @ 2015-11-07 03:23 一心一念 阅读(224) 评论(0) 推荐(0) 编辑

2015年11月5日

摘要: 【Problem】Unique CharactersImplement an algorithm to determine if a string has all unique characters.ExampleGiven "abc", return true.Given "aab", retur... 阅读全文
posted @ 2015-11-05 03:00 一心一念 阅读(213) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9

导航