摘要:
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 ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文