leetcode 数组
a7895906
这个作者很懒,什么都没留下…
展开
-
leetcode rotate-image(90°旋转矩阵)
原题: 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-place? 题意就不多说了,比较经典的一个问题,90度顺时针旋转一个n*n的二维矩阵,难点在于只能使原创 2017-05-18 09:12:31 · 365 阅读 · 0 评论 -
leetcode two-sum
原题: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the targ原创 2017-05-18 16:47:55 · 282 阅读 · 0 评论 -
leetcode 3sum
原题:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 题意:给定一个数组num,求数组中三个数字相加为0的所有组合原创 2017-05-18 19:39:50 · 413 阅读 · 0 评论