上一页 1 2 3 4 5 6 7 8 ··· 28 下一页
摘要: Just...Implement pow(x, n).Solution:1)Naive solution:multiply x by itself for n-1 times. (Or simply reyurn 1 if n==0).This takes O(n) time. When n is ... 阅读全文
posted @ 2015-08-04 21:31 曾可爱 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.Solution:要求把所有存在an... 阅读全文
posted @ 2015-08-04 20:56 曾可爱 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-pl... 阅读全文
posted @ 2015-08-04 20:44 曾可爱 阅读(100) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 28 下一页