LeetCode
摘要:LeetCode 第一题:两数之和 思路:首先会想到暴力解题,遍历数组中的每个数,找出符合条件的返回即可。 用到for循环和if语句,以下为代码: class Solution { public int[] twoSum(int[] nums, int target) { int n = nums.
阅读全文
posted @ 2021-08-26 18:46
posted @ 2021-08-26 18:46