1. 两数之和 哈希表 遍历数组,同时用 HashMap 维护已出现过的数及其下标 若当前的数 nums[i] 满足 target - nums[i] 曾经出现过,则直接返回 否则将其加入到哈希表中。 class Solution { public int[] twoSum(int[] nums, …
2651. 计算列车到站时间 题目大意: 给你一个正整数 arrivalTime 表示列车正点到站的时间(单位:小时),另给你一个正整数 delayedTime 表示列车延误的小时数。 返回列车实际到站的时间。 注意,该问题中的时间采用 24 小时制。 思想: 签到题 返回 (arrivalTime…
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-content/themes/argon-theme-featured/inc/fun/paginate.php on line 22
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-content/themes/argon-theme-featured/inc/fun/paginate.php on line 22