You are given an n x n 2D matrix rePResenting an image. Rotate the image by 90 degrees (clockwise).
顺时针将二维数组旋转90度,可以分为两个操作进行:先将数组的行列号相调换,然后对每行进行反转。
Given an array of strings, group anagrams together. For example, given: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], Return:
[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]使用STL可以较轻松的求解问题。
Implement pow(x, n).
可以使用位运算来求解问题。当然,这道题有多种解法。
新闻热点
疑难解答