自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

fighting!

空白

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

原创 Array-Find the Duplicate Number

Description: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplic...

2017-11-30 00:58:59 215

原创 Array-Combination Sum III

Description: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.Example 1:...

2017-11-30 00:53:35 148

原创 Array-Product of Array Except Self

Description: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without divis...

2017-11-30 00:45:23 202

原创 Array-Teemo Attacking

Description: In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo’s attacking ascending time series towards Ashe and th...

2017-11-30 00:35:08 182

原创 Array-Beautiful Arrangement II

Description:Given two integers n and k, you need to construct a list which contains n different positive integers ranging from 1 to n and obeys the following requirement:Suppose this list is [a1,...

2017-11-30 00:26:03 181

原创 机器学习实战笔记-利用PCA来简化数据

本篇文章不涉及理论推理。如果你想知道为什么通过协方差矩阵算出特征向量和特征值,然后对特征值进行排序后找到对应的特征向量与原矩阵X相乘即可得到降维后的X,可以去看看这篇文章: http://blog.csdn.net/sinat_17451213/article/details/51193720 里面包含了如何通过基(对应特征向量)来对向量降维,如何通过原始数据集的协方差矩阵来得到特征值和特征向量

2017-11-29 15:23:38 502

转载 转载-面试必考的计算机网络知识点梳理

出处:http://blog.csdn.net/gitchat/article/details/78546898本文来自作者 宋璐 在 GitChat 上分享「如何快速入门网络基础知识(TCP/IP 和 HTTP)」,「阅读原文」查看交流实录「文末高能」编辑 | 嘉仔传输层概作用:传输层为它上面的应用层提供通信服务。在OSI七层参考模型中,传输层是面向通信的最高层,也是用户功能的最底层。传输层两

2017-11-29 10:51:09 635

转载 转载-机器学习实战之PCA

1.  向量及其基变换1.1 向量内积(1)两个维数相同的向量的内积定义如下: 内积运算将两个向量映射为一个实数.(2) 内积的几何意义    假设A\B是两个n维向量, n维向量可以等价表示为n维空间中的一条从原点发射的有向线段, 为方便理解, 在这里假设A和B都是二维向量.A=(x1,y1) , B=(x2,y2),在二维平面上A/B可以用两条发自原点的有向线段表示,如下图:在上图中,从

2017-11-29 10:44:28 306

原创 Array-Find All Duplicates in an Array

Description:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it ...

2017-11-27 22:30:49 137

原创 Array-Non-decreasing Array

Description: Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i] <= array[i ...

2017-11-27 22:18:07 179

原创 Array-Rotate Array

Description:Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Note:Try to come up as many sol...

2017-11-27 22:00:42 246

原创 Array-Third Maximum Number

Description: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Example 1:I...

2017-11-27 21:50:32 217

原创 机器学习实战笔记-使用FP-growth算法来高效发现频繁项集

上一章我们讨论了从数据集中获取有趣信息的方法,最常用的两种分别是频繁项集与关联规则。第11章中介绍了发现频繁项集与关键规则的算法,本章将继续关注发现频繁项集这一任务。我们会深人探索该任务的解决方法,并应用FP-growth算法进行处理,该算法能够更有效地挖掘数据。这种算法虽然能更为高效地发现频繁项集,但不能用于发现关联规则。 FP-growth算法只需要对数据库进行两次扫描,而Apriori算法对

2017-11-27 21:36:30 2199

原创 Array-K-diff Pairs in an Array

Description: Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), where i and j are b...

2017-11-26 17:25:05 263

原创 Array-Shortest Unsorted Continuous Subarray

Description: Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.You...

2017-11-26 17:17:01 384

原创 Array-Can Place Flowers

Description: Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they would compete for water and both wo...

2017-11-26 16:45:51 191

原创 Array-Merge Sorted Array

Description: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size that is greater or equal to m + n) t...

2017-11-26 16:31:57 219

原创 Array-Contains Duplicate II

Decsription: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j ...

2017-11-26 12:04:31 111

原创 Array-Two Sum

Description: Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not...

2017-11-26 11:37:10 167

原创 Array-Pascal's Triangle II

Description: Given an index k, return the kth row of the Pascal’s triangle.For example, given k = 3, Return [1,3,3,1].Note: Could you optimize your algorithm to use only O(k) extra space?My S...

2017-11-26 11:27:36 237

原创 Array-Maximum Average Subarray I

Description: Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the maximum average value.Example 1:...

2017-11-26 11:15:33 249

原创 Array-Plus One

Description: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not contain any leading zero, except the number 0 itself....

2017-11-26 11:01:51 243

原创 Array-Pascal's Triangle

Description: Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5,Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]My Solution:...

2017-11-26 10:50:02 207

原创 Array-Longest Continuous Increasing Subsequence

Description: Given an unsorted array of integers, find the length of longest continuous increasing subsequence. Example 1:Input: [1,3,5,4,7]Output: 3Explanation: The longest continuous increa...

2017-11-23 23:25:32 196

原创 Array-Missing Number

Description: Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.For example, Given nums = [0, 1, 3] return 2. Note: Your algorit...

2017-11-23 23:14:00 187

原创 Array-Maximum Product of Three Numbers

Description: Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [1,2,3,4]Output: 24No...

2017-11-23 23:06:58 79

原创 Array-Image Smoother

Description: Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the average gray scale (rounding down) of a...

2017-11-23 23:02:44 159

原创 Array-Contains Duplicate

Description: Given 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 false if ev...

2017-11-23 22:56:27 232

原创 机器学习实战笔记-使用Apriori算法进行关联分析

在去杂货店买东西的过程,实际包含了许多机器学习的当前及未来应用,这包括物品的展示方式、购物之后优惠券的提供以及用户忠诚度计划,等等。它们都离不开对大量数据的分析。 通过查看哪些商品经常在一起购买,可以帮助商店了解用户的购买行为。这种从数据海洋中抽取的知识可以用于商品定价、市场促销、存货管理等环节。从大规模数据集中寻找物品间的隐含关系被称作关联分析(association analysis ) 或者

2017-11-23 22:26:26 4248 2

原创 Array-Degree of an Array

Description: Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.Your task is to find the smallest possibl...

2017-11-22 21:06:47 230

原创 Array-Two Sum II - Input array is sorted

Description: 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 th...

2017-11-22 20:50:21 169

原创 Array-Majority Element

Description: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majorit...

2017-11-22 19:08:56 195

原创 Array-Best Time to Buy and Sell Stock II

Description: 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...

2017-11-22 18:41:24 162

原创 Array-Move Zeroes

Description: 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 ...

2017-11-22 18:35:27 394

原创 Array-Find All Numbers Disappeared in an Array

Description: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in thi...

2017-11-21 22:18:02 194

原创 Array-1-bit and 2-bit Characters

Description: We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11).Now given a string represented by se...

2017-11-21 20:48:58 223

原创 Array-Max Area of Island

Description: 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 g...

2017-11-21 19:55:14 173

原创 Array-Max Consecutive Ones

Description: Given a binary array, find the maximum number of consecutive 1s in this array.Example1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are...

2017-11-21 17:37:11 153

原创 Array-Reshape the Matrix

Problem Description: 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 repr...

2017-11-21 17:15:46 80

原创 机器学习实战笔记-利用K均值聚类算法对未标注数据分组

聚类是一种无监督的学习,它将相似的对象归到同一个簇中。它有点像全自动分类。聚类方法几乎可以应用于所有对象,簇内的对象越相似,聚类的效果越好 簇识别给出聚类结果的含义。假定有一些数据,现在将相似数据归到一起,簇识别会告诉我们这些簇到底都是些什么。聚类与分类的最大不同在于,分类的目标事先巳知,而聚类则不一样。因为其产生 的结果与分类相同,而只是类别没有预先定义,聚类有时也被称为无监督分类(unsup

2017-11-20 21:43:05 1333

空空如也

空空如也

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

TA关注的人

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