摘要:
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
曾可爱
阅读(142)
评论(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
曾可爱
阅读(105)
评论(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
曾可爱
阅读(103)
评论(0)
推荐(0)

浙公网安备 33010602011771号