摘要: Interleaving StringAug 31 '12Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="aadbbbaccc", return false..public class Solution { public boolean isInterleav 阅读全文
posted @ 2013-02-05 08:29 西施豆腐渣 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Rotate ImageMar 18 '12You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?public class Solution { public void rotate(int[][] matrix) { // Start typing your Java solution below // DO NOT write main() fu... 阅读全文
posted @ 2013-02-05 07:05 西施豆腐渣 阅读(136) 评论(0) 推荐(0) 编辑