搜索结果
查询Tags标签: numMap,共有 3条记录-
两数之和 twoSum
given nums = [2, 7, 11, 15], target = 9,Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1].std::vector<int> twoSum(std::vector<int>& nums, int target){for (int i=0;i<nums.size();i++){for (int j = i+1; j<nums.size();j++){if (num…
2021/8/4 23:07:53 人评论 次浏览 -
两数之和 twoSum
given nums = [2, 7, 11, 15], target = 9,Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1].std::vector<int> twoSum(std::vector<int>& nums, int target){for (int i=0;i<nums.size();i++){for (int j = i+1; j<nums.size();j++){if (num…
2021/8/4 23:07:53 人评论 次浏览 -
睡不着,写了个数羊小程序
最多数99999只羊,数多了电脑也累1 import java.util.HashMap;2 import java.util.Map;3 4 public class CountingSheep {5 6 private static String[] units = {"","十","百","千","万"};7 private static Ma…
2021/5/4 12:28:52 人评论 次浏览