- 博客(13)
- 收藏
- 关注
原创 LeetCode---Move Zeroes、Third Maximum Number、Find All Duplicates in an Array、Find All Numbers Disappe
283.Move ZeroesGiven an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.Example:Input: [0,1,0,3,12]Output: [1,3,12,...
2019-06-26 21:50:47 123
转载 机器学习--准确率、精确率、召回率、F1、ROC、AUC
准确率就是所有预测正确的占总的比重,即(TP+TN)/(TP+FP+FN+TN)精确率(Precition)是指在所有系统判定“真”的样本中,确实是真的占比,即TP/(TP+FP)召回率(Recall)是指在所有确实为真的样本中,被判定为“真的”占比,即TP/(TP+FN)TPR的定义和召回率是一样的FPR就是指所有确实为“假”的样本中,被误判为真的样本,即TP/(TP+TN)...
2019-06-26 16:55:42 729
原创 LeetCode---Rotate Array、Missing Number
189.Rotate ArrayGiven an array, rotate the array to the right byksteps, wherekis non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps...
2019-06-25 19:55:57 160
原创 LeetCode---Contains Duplicate
217.Contains DuplicateGiven an array of integers, find if the array contains any duplicates.Your function should return true if any value appears at least twice in the array, and it should return...
2019-06-25 19:21:38 147
原创 LeetCode---Majority Element
169.Majority ElementGiven an array of sizen, find the majority element. The majority element is the element that appearsmore than⌊ n/2 ⌋times.You may assume that the array is non-empty and th...
2019-06-24 21:33:33 118
原创 LeetCode---Best Time to Buy and Sell Stock I和II
121.Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (i.e., buy...
2019-06-24 20:43:17 121
原创 LeetCode---Pascal's Triangle II
Given a non-negativeindexkwherek≤33, return thekthindex row of the Pascal's triangle.Note that the row index starts from0.In Pascal's triangle, each number is the sum of the two numbers ...
2019-06-23 21:59:27 125
原创 LeetCode---Pascal's Triangle
Given a non-negative integernumRows, generate the firstnumRowsof Pascal's triangle.In Pascal's triangle, each number is the sum of the two numbers directly above it.Example:Input: 5Output:...
2019-06-23 21:43:19 150
原创 LeetCode---Merge Sorted Array
Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:The number of elements initialized innums1andnums2aremandnrespectively. You may assume tha...
2019-06-21 21:48:05 101
原创 LeetCode---Plus One
Given anon-emptyarray of digitsrepresenting a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each element...
2019-06-21 21:24:47 116
原创 七月在线机器学习笔试题错题记录1
解析:随机事件 X 所包含的信息量与其发生的概率有关。发生的概率越小,其信息量就越大;反之,必定发生的事件(如太阳东升西落),其信息量为 0。信息量公式:I(X) = −logp(X) ,其中 I 是 information 的缩写。信息量公式的单位:log 以2为底,记作lb,单位比特(bit)log 以e为底,记作ln,单位奈特(nat)log 以10为底,记作lg,单位哈...
2019-06-21 20:46:43 541
原创 LeetCode---Pow(x, n)
Implementpow(x,n), which calculatesxraised to the powern(xn).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100Example 3:Input: 2.00000, ...
2019-06-20 16:04:10 125
原创 LeetCode---Valid Sudoku
Determine if a9x9 Sudoku boardis valid.Only the filled cells need to be validatedaccording to the following rules:Each rowmust contain thedigits1-9without repetition. Each column must conta...
2019-06-17 19:39:17 87
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人