- 博客(28)
- 收藏
- 关注
原创 451. Sort Characters By Frequency
【Leetcode】Java 451. Sort Characters By Frequency
2022-07-04 23:30:49
222
原创 215. Kth Largest Element in an Array
LeetCode Java 215. Kth Largest Element in an Array
2022-06-27 23:41:53
223
原创 524. Longest Word in Dictionary through Deleting
【Leetcode】 Java 524. Longest Word in Dictionary through Deleting
2022-06-26 21:07:01
231
原创 680. Valid Palindrome II
680. Valid Palindrome II这是一个双指针问题,但是要注意删除后面或者前面的数有两个选择,会出现不该删除该字母但是结果旁边,例如,我下面这段代码就是这样的问题:改过来之后,再定义一个函数来判断大公搞成了!!...
2022-06-26 10:14:34
98
原创 345. Reverse Vowels of a String
【LeetCode】Java 345. Reverse Vowels of a String
2022-06-24 23:30:53
119
原创 633. Sum of Square Numbers
LeetCode 633. Sum of Square NumbersGiven a non-negative integer , decide whether there’re two integers and such that Constraints:典型的双指针问题,不过多赘述了,但是这里注意,平方之后超过了int的范围,所用要用long类型来解这个题。...
2022-06-23 23:12:52
91
原创 【LeetCode】C++ 567. Permutation in String
Given two stringss1ands2, returntrueifs2contains a permutation ofs1, orfalseotherwise.In other words, returntrueif one ofs1's permutations is the substring ofs2.Example 1:Input: s1 = "ab", s2 = "eidbaooo"Output: trueExplanation: s2...
2022-03-08 20:19:58
483
原创 【LeetCode】C++ 3. Longest Substring Without Repeating Characters
Given a strings, find the length of thelongest substringwithout repeating characters.Example 1:Input: s = "abcabcbb"Output: 3Explanation: The answer is "abc", with the length of 3.Example 2:Input: s = "bbbbb"Output: 1Explanation: The an...
2022-03-08 19:32:28
354
原创 【LeetCode】19. Remove Nth Node From End of List
Given theheadof a linked list, remove thenthnode from the end of the list and return its head.Example 1:Input: head = [1,2,3,4,5], n = 2Output: [1,2,3,5]Example 2:Input: head = [1], n = 1Output: []Example 3:Input: head = [1,2], n...
2022-03-08 19:31:24
77
原创 【LeetCode】876. Middle of the Linked List
Given theheadof a singly linked list, returnthe middle node of the linked list.If there are two middle nodes, returnthe second middlenode.Example 1:Input: head = [1,2,3,4,5]Output: [3,4,5]Explanation: The middle node of the list is node 3...
2022-03-08 11:35:11
100
原创 【LeetCode】c++ 557. Reverse Words in a String III
Given a strings, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:Input: s = "Let's take LeetCode contest"Output: "s'teL ekat edoCteeL tsetnoc"Example 2:Input: .
2022-03-08 11:10:34
429
原创 【Leetcode】344. Reverse String C++
Write a function that reverses a string. The input string is given as an array of characterss.You must do this by modifying the input arrayin-placewithO(1)extra memory.Example 1:Input: s = ["h","e","l","l","o"]Output: ["o","l","l","e","h"]...
2022-03-08 07:56:09
495
原创 167. Two Sum II - Input Array Is Sorted
Given a1-indexedarray of integersnumbersthat is alreadysorted in non-decreasing order, find two numbers such that they add up to a specifictargetnumber. Let these two numbers benumbers[index1]andnumbers[index2]where1 <= index1< index2&l...
2022-03-03 22:26:10
129
原创 189. Rotate Array
Given an array, rotate the array to the right byksteps, wherekis non-negative.Example 1:Input: nums = [1,2,3,4,5,6,7], k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps to the right: [7,1,2,3,4,5,6]rotate 2 steps to the right: [6,7,1,2,...
2022-03-03 21:56:01
97
原创 283. Move Zeroes
Given an integer arraynums, move all0's to the end of it while maintaining the relative order of the non-zero elements.Notethat you must do this in-place without making a copy of the array.Example 1:Input: nums = [0,1,0,3,12]Output: [1,3,12,0,...
2022-03-03 21:55:11
75
原创 977. Squares of a Sorted Array C++
Given an integer arraynumssorted innon-decreasingorder, returnan array ofthe squares of each numbersorted in non-decreasing order.Example 1:Input: nums = [-4,-1,0,3,10]Output: [0,1,9,16,100]Explanation: After squaring, the array becomes [16...
2022-03-02 11:17:18
172
原创 【LeetCode】35. Search Insert Position C++
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You mustwrite an algorithm withO(log n)runtime complexity.Example 1:I...
2022-03-02 10:58:38
384
原创 278. First Bad Version
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version
2022-03-02 10:43:13
119
原创 278. First Bad Version C++
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version
2022-03-02 10:23:03
628
原创 Exercise2-Question
手写数字识别,Coursera week2 实验答案, 卷积神经网络Exercise 2In the course you learned how to do classificaiton using Fashion MNIST, a data set containing items of clothing. There’s another, similar dataset called MNIST which has items of handwriting – the digits 0 throu
2021-12-12 21:06:35
1785
原创 机器学习——线性回归详解
本文使用标准方程,scikit包,以及伪逆对线性回归模型求解进行了详解和代码实现线性回归先生成一个函数进行测试,我们来看看生成随机的点如下图所示。我们再对其进行拟合import numpy as npimport matplotlib.pyplot as pltnp.random.seed(27)X = 2 * np.random.rand(100, 1)y = 4 + 3 * X + np.random.randn(100, 1)plt.plot(X, y, "b.")plt.xla
2021-12-09 16:44:33
1365
原创 二分类器、混淆矩阵、精度、召回率、ROC曲线、PR曲线、多类分类器,误差分析
手写数字识别,机器学习“分类”学习笔记—来自Geron的《机器学习实战》图片识别领域的“hello word”文章目录MNIST训练二元分类器性能测量使用交叉验证测量准确率混淆矩阵精度和召回率精度/召回率权衡ROC曲线多类分类器误差分析MNIST获取MNIST代码,70000张手写数字的图片----28x28个像素0-255黑白像素点Scitkit-Learn 加载数据集通常为字典结构(这里需要下载数据集,时间比较长,data_home为保存路径,事先设定好路径之后就不会找不到数据存放在那了)
2021-12-07 23:24:42
1630
原创 二分类器、混淆矩阵、精度、召回率、ROC曲线、PR曲线
手写数字识别,机器学习“分类”学习笔记—来自Geron的《机器学习实战》图片识别领域的“hello word”文章目录MNIST训练二元分类器性能测量使用交叉验证测量准确率混淆矩阵精度和召回率精度/召回率权衡ROC曲线MNIST获取MNIST代码,70000张手写数字的图片----28x28个像素0-255黑白像素点Scitkit-Learn 加载数据集通常为字典结构(这里需要下载数据集,时间比较长,data_home为保存路径,事先设定好路径之后就不会找不到数据存放在那了)from skle
2021-12-05 23:00:24
1244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人