自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

lhppom

机器学习、语音大白

  • 博客(21)
  • 收藏
  • 关注

原创 Leetcode #229. Majority Element II

##题目Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.Note: The algorithm should run in linear time and in O(1) space.Example 1:Input: [3,2,3]Output: [3]Exa...

2020-02-22 11:30:17 132

原创 Leetcode#60. Permutation Sequence

题目The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, we get the following sequence for n = 3:“123” “132” “213” “231” “31...

2018-06-12 09:51:48 166

原创 Leetcode #15. 3Sum

题目Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not ...

2018-06-04 16:15:01 150

原创 Leetcode #128. Longest Consecutive Sequence

题目Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example:Input: [100, 4, 200, 1, 3, 2] Output: ...

2018-06-01 17:11:04 167

原创 Leetcode #82. Remove Duplicates from Sorted List II

题目Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.Example 1:Input: 1->2->3->3->4->4->5 Output: 1...

2018-05-18 17:24:28 117

原创 Leetcode#268. Missing Number

题目Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.Example 1Input: [3,0,1] Output: 2 Example 2Input: [9,6,4,2,3,5,7,0,1] Ou...

2018-04-04 10:50:54 156

原创 Leetcode#167. Two Sum II - Input array is sorted

题目Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numb...

2018-03-29 14:48:07 112

转载 Python实现控制台中的进度条

原代码出处:https://www.cnblogs.com/lustralisk/p/pythonProgressBar.html在上面这篇文章里其实作者把很多细节讲得挺清楚的,我在这里只是结合我最后的理解把代码做一下注释,import time,sysclass ProgressBar: def __init__(self, count = 0, total = 0,...

2018-03-29 11:52:58 357

原创 Leetcode #122. Best Time to Buy and Sell Stock II

题目Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy ...

2018-03-28 16:02:14 106

原创 CS231N assignment1——Softmax exercise

Softmax exerciseComplete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. For more details see the assig...

2018-03-22 14:50:56 394

原创 CS231N assignment1——SVM

Multiclass Support Vector Machine exerciseComplete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. For ...

2018-03-22 14:50:25 319

原创 CS231N assignment1——KNN

k-Nearest Neighbor (kNN) exercise题目提示:The kNN classifier consists of two stages:During training, the classifier takes the training data and simply remembers itDuring testing, kNN classifies ...

2018-03-22 14:49:51 329

原创 Leetcode #283. Move Zeroes

题目Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling you...

2018-03-22 10:18:00 129

原创 Leetcode #695. Max Area of Island

题目Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are su...

2018-03-17 09:20:05 273

原创 Leetcode #121. Best Time to Buy and Sell Stock

题目Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock...

2018-03-15 09:06:46 115

原创 Leetcode #766. Toeplitz Matrix

题目A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element.Now given an M x N matrix, return True if and only if the matrix is Toeplitz.Example 1:Input: matrix...

2018-03-14 20:45:23 148

原创 Leetcode #566. Reshape the Matrix

题意In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.You’re given a matrix represented by a two-d...

2018-03-13 09:24:07 137

原创 Leetcode #682. Baseball Game

题目You’re now a baseball game point recorder.Given a list of strings, each string can be one of the 4 following types:Integer (one round’s score): Directly represents the number of points you get...

2018-03-12 16:15:02 181

原创 Leetcode #575. Distribute Candies

题目Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute t...

2018-03-10 11:06:44 201

原创 Leetcode #461. Hamming Distance

题目The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note: 0 ≤ x, y &l...

2018-03-09 20:44:48 132

转载 EM算法初探——公式推导和三硬币模型解析

EM算法初探——公式推导和三硬币模型解析 转载借鉴:http://www.cnblogs.com/jerrylead/archive/2011/04/06/2006936.html#!comments这篇博客是在学习了诸多网友后略有所触后记下,大部分内容还是从他们的博客中搬运,诸如推导等,在此基础上增加自己在这个过程的一些理解和注解,希望对大家有帮助,若文中有问题也希望大家指出,共同...

2018-03-09 20:37:06 5613 3

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除