博客搬至blog.csgrandeur.com,cnblogs不再更新. 新的题解会更新在新博客:http://blog.csgrandeur.com/2014/01/15/LeetCode-OJ-Solution/ ———————————————————————————————————————— ———————————————————————————————————————— LeetCode OJ 题解 LeetCode OJ is a platform for preparing tech…
这是leetcode第一题,通过较为简单. 第一题用来测试的,用的c,直接暴力法过, /** * Note: The returned array must be malloced, assume caller calls free(). */ int* twoSum(int* nums, int numsSize, int target) { ]={}; ;i<numsSize-;i++) ;j<numsSize;j++) if(nums[i]+nums[j]==target){ a[]=i…