WELCOME TO Pluto134340小行星

清风湿润,茶烟轻扬。
摘要: 15. 三数之和 给你一个整数数组 nums ,判断是否存在三元组 [nums[i], nums[j], nums[k]] 满足 i != j、i != k 且 j != k ,同时还满足 nums[i] + nums[j] + nums[k] == 0 。请你返回所有和为 0 且不重复的三元组。 阅读全文
posted @ 2026-01-07 17:40 Pluto134340 阅读(0) 评论(0) 推荐(0)
摘要: 11. 盛最多水的容器 给定一个长度为 n 的整数数组 height 。有 n 条垂线,第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。 找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 返回容器可以储存的最大水量。 示例 1: 输入:[1,8,6,2 阅读全文
posted @ 2026-01-07 16:21 Pluto134340 阅读(1) 评论(0) 推荐(0)
摘要: 283. 移动零 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 请注意 ,必须在不复制数组的情况下原地对数组进行操作。 示例 1: 输入: nums = [0,1,0,3,12] 输出: [1,3,12,0,0] 示例 2: 输入: nums = [ 阅读全文
posted @ 2026-01-07 15:47 Pluto134340 阅读(1) 评论(0) 推荐(0)
摘要: 128. 最长连续序列 给定一个未排序的整数数组 nums ,找出数字连续的最长序列(不要求序列元素在原数组中连续)的长度。 请你设计并实现时间复杂度为 O(n) 的算法解决此问题。 示例 1: 输入:nums = [100,4,200,1,3,2] 输出:4 解释:最长数字连续序列是 [1, 2, 阅读全文
posted @ 2026-01-07 13:40 Pluto134340 阅读(2) 评论(0) 推荐(0)
摘要: 题目描述: 给你一个字符串数组,请你将字母异位词 组合在一起。可以按任意顺序返回结果列表。 示例 1: 输入: strs = ["eat", "tea", "tan", "ate", "nat", "bat"] 输出: [["bat"],["nat","tan"],["ate","eat","tea 阅读全文
posted @ 2026-01-05 21:10 Pluto134340 阅读(2) 评论(0) 推荐(0)
摘要: 1、暴力枚举 num.length 获取长度 返回数组 int[]{i,j} class Solution { public int[] twoSum(int[] nums, int target) { int n = nums.length; for(int i = 0;i<n-1;i++){ f 阅读全文
posted @ 2026-01-05 20:05 Pluto134340 阅读(4) 评论(0) 推荐(0)
摘要: 1. RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some othe 阅读全文
posted @ 2025-04-08 15:44 Pluto134340 阅读(120) 评论(0) 推荐(0)
摘要: 简单线性回归 import numpy as np from sklearn.linear_model import LinearRegression x = np.array([143, 145, 147, 149, 150, 153, 154, 155, 156, 157, 158, 159, 阅读全文
posted @ 2022-07-03 19:35 Pluto134340 阅读(270) 评论(0) 推荐(0)
摘要: 一、原理 注意 专有名词。(例如:极高相关) 二、代码 import numpy as np f = open('../file/Pearson.csv', encoding='utf-8') data = np.loadtxt(f,int,delimiter = ",", skiprows = 1 阅读全文
posted @ 2022-07-01 13:12 Pluto134340 阅读(993) 评论(0) 推荐(0)