自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(92)
  • 收藏
  • 关注

原创 [leetcode]593. Valid Square

题目链接:https://leetcode.com/problems/valid-square/#/descriptionGiven the coordinates of four points in 2D space, return whether the four points could construct a square.The coordinate (x,y) of

2017-05-29 11:55:01 489

原创 [leetcode]187. Repeated DNA Sequences

题目链接:https://leetcode.com/problems/repeated-dna-sequences/#/descriptionAll DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA,

2017-05-29 11:32:07 232

原创 [leetcode]3. Longest Substring Without Repeating Characters

题目链接:https://leetcode.com/problems/longest-substring-without-repeating-characters/#/description Given a string, find the length of the longest substring without repeating characters.Examples:G...

2017-05-29 10:58:39 249

原创 [leetcode]81. Search in Rotated Sorted Array II

题目链接:https://leetcode.com/problems/search-in-rotated-sorted-array-ii/#/descriptionFollow upfor "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexit...

2017-05-28 11:48:35 362

原创 [leetcode]33. Search in Rotated Sorted Array

题目链接:https://leetcode.com/problems/search-in-rotated-sorted-array/#/descriptionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might ...

2017-05-28 11:07:14 294

原创 [leetcode]16. 3Sum Closest

题目链接:https://leetcode.com/problems/3sum-closest/#/descriptionGiven an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of th

2017-05-28 10:26:48 256

原创 [leetcode]120. Triangle

题目链接:https://leetcode.com/problems/triangle/#/descriptionGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For examp

2017-05-27 12:06:27 325

原创 [leetcode]151. Reverse Words in a String

题目链接:https://leetcode.com/problems/reverse-words-in-a-string/#/descriptionGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is s

2017-05-26 11:45:56 319

原创 [leetcode]143. Reorder List

题目链接:https://leetcode.com/problems/reorder-list/#/descriptionGiven a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering

2017-05-26 10:47:52 218

原创 [leetcode]556. Next Greater Element III

题目链接:https://leetcode.com/problems/next-greater-element-iii/#/descriptionGiven a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in t...

2017-05-25 11:26:13 383

原创 [leetcode]54. Spiral Matrix

题目链接:https://leetcode.com/problems/spiral-matrix/#/descriptionGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the

2017-05-25 11:06:40 206

原创 [leetcode]456. 132 Pattern

题目链接:https://leetcode.com/problems/132-pattern/#/solutionsGiven a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, aksuch thatijkand ai< akj. Desig

2017-05-25 10:21:46 388 1

原创 [leetcode]222. Count Complete Tree Nodes

题目链接:https://leetcode.com/problems/count-complete-tree-nodes/#/descriptionGiven a complete binary tree, count the number of nodes.Definition of a complete binary tree from Wikipedia:In a c

2017-05-24 21:21:56 279

原创 [leetcode]134. Gas Station

题目链接:https://leetcode.com/problems/gas-station/#/descriptionThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited g

2017-05-24 20:23:30 292

原创 [leetcode]228. Summary Ranges

题目链接:https://leetcode.com/problems/summary-ranges/#/descriptionGiven a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return ["0-

2017-05-24 20:05:21 251

原创 [leetcode]56. Merge Intervals

题目链接:https://leetcode.com/problems/merge-intervals/#/descriptionGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6]

2017-05-24 17:33:42 521

原创 [leetcode]522. Longest Uncommon Subsequence II

题目链接:https://leetcode.com/problems/longest-uncommon-subsequence-ii/#/descriptionGiven a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subs

2017-05-24 16:26:41 738 2

原创 [leetcode]521. Longest Uncommon Subsequence I

题目链接:https://leetcode.com/problems/longest-uncommon-subsequence-i/#/descriptionGiven a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The l

2017-05-24 15:48:52 314

转载 pLSA 和 LDA

作者:weizier链接:https://www.zhihu.com/question/23642556/answer/38969800来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。”在这些文档中出现的概率相当。一般来说一篇文档都含有多个主题,这些主题之间所占比例有所不同,一篇文档10%是有关猫90%有关狗,那么这篇文档“狗”这个词出现的次数

2017-05-23 20:25:34 2573

原创 字符相似性几种度量方法

无论是做科学研究,还是工程项目,我们总是会碰上要比较字符串的相似性,比如拼写纠错、文本去重、上下文相似性等。度量的方法有很多,到底使用哪一种方法来计算相似性,这就需要我们根据情况选择合适的方法来计算。这里把几种常用到的度量字符串相似性的方法罗列一下,仅供参考,欢迎大家补充指正。1、余弦相似性(cosine similarity) 余弦相似性大家都非常熟悉,它是定义在向量空间模型(VSM

2017-05-23 19:24:49 944

原创 [leetcode]209. Minimum Size Subarray Sum

题目链接:https://leetcode.com/problems/minimum-size-subarray-sum/#/descriptionGiven an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of whic

2017-05-22 21:30:15 225

原创 [leetcode]560. Subarray Sum Equals K

题目链接:https://leetcode.com/problems/subarray-sum-equals-k/#/descriptionGiven an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k

2017-05-22 21:12:29 348

原创 [leetcode]581. Shortest Unsorted Continuous Subarray

题目链接:https://leetcode.com/problems/shortest-unsorted-continuous-subarray/#/descriptioniven an integer array, you need to find one continuous subarray that if you only sort this subarray in ascen

2017-05-22 20:30:48 198

原创 [leetcode]95. Unique Binary Search Trees II

题目链接:https://leetcode.com/problems/unique-binary-search-trees-ii/#/descriptionGiven an integer n, generate all structurally unique BST's (binary search trees) that store values 1...n.For exa

2017-05-22 11:47:55 234

原创 [leetcode]123. Best Time to Buy and Sell Stock III

题目链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/#/descriptionay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm

2017-05-22 10:54:11 313

转载 主题模型-LDA浅析

(一)LDA作用        传统判断两个文档相似性的方法是通过查看两个文档共同出现的单词的多少,如TF-IDF等,这种方法没有考虑到文字背后的语义关联,可能在两个文档共同出现的单词很少甚至没有,但两个文档是相似的。        举个例子,有两个句子分别如下:                “乔布斯离我们而去了。”                “苹果价格会不会降?”   

2017-05-21 21:11:47 377

转载 TextRank算法为文本生成关键字和摘要

TextRank算法基于PageRank,用于为文本生成关键字和摘要。其论文是:Mihalcea R, Tarau P. TextRank: Bringing order into texts[C]. Association for Computational Linguistics, 2004.先从PageRank讲起。PageRankPageRank最开始用来计

2017-05-21 20:55:03 4031

原创 [leetcode]220. Contains Duplicate III

题目链接:https://leetcode.com/problems/contains-duplicate-iii/#/descriptionGiven an array of integers, find out whether there are two distinct indicesiandjin the array such that theabsolutedifferenc...

2017-05-21 13:43:51 311

原创 [leetcode]397. Integer Replacement

题目链接:https://leetcode.com/problems/integer-replacement/Given a positive integer n and you can do operations as follow:If n is even, replace n with n/2.If n is odd, you can replace n

2017-05-21 11:36:33 198

原创 [leetcode]306. Additive Number

题目链接:https://leetcode.com/problems/additive-number/#/descriptionAdditive number is a string whose digits can form additive sequence.A valid additive sequence should contain at least three nu

2017-05-21 11:16:45 394

转载 深度学习调参策略(二)

超参数(Hyper-Parameter)是困扰神经网络训练的问题之一,因为这些参数不可通过常规方法学习获得。神经网络经典五大超参数:学习率(Leraning Rate)、权值初始化(Weight Initialization)、网络层数(Layers)单层神经元数(Units)、正则惩罚项(Regularizer|Normalization)这五大超参数使得神经网络

2017-05-20 20:09:25 1409 1

转载 深度学习调参策略(一)

经常会被问到你用深度学习训练模型时怎么样改善你的结果呢?然后每次都懵逼了,一是自己懂的不多,二是实验的不多,三是记性不行忘记了。所以写这篇博客,记录下别人以及自己的一些经验。Ilya Sutskever(Hinton的学生)讲述了有关深度学习的见解及实用建议:获取数据:确保要有高质量的输入/输出数据集,这个数据集要足够大、具有代表性以及拥有相对清楚的标签。缺乏数据集是很难成功的

2017-05-20 20:08:27 3803

原创 准确率、召回率、F1

准确率和召回率是广泛用于信息检索和统计学分类领域的两个度量值,用来评价结果的质量。其中精度是检索出相关文档数与检索出的文档总数的比率,衡量的是检索系统的查准率;召回率是指检索出的相关文档数和文档库中所有的相关文档数的比率,衡量的是检索系统的查全率。一般来说,Precision就是检索出来的条目(比如:文档、网页等)有多少是准确的,Recall就是所有准确的条目有多少被检索出来了。正

2017-05-20 19:30:37 397

原创 [leetcode]221. Maximal Square

题目链接:https://leetcode.com/problems/maximal-square/#/descriptionGiven a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.For examp

2017-05-20 16:18:50 201

原创 [leetcode]152. Maximum Subarray

题目链接:https://leetcode.com/problems/maximum-product-subarray/#/descriptionFind the contiguous subarray within an array (containing at least one number) which has the largest product.For examp

2017-05-20 15:33:27 217

原创 [leetcode]152. Maximum Product Subarray

题目链接:https://leetcode.com/problems/maximum-product-subarray/#/descriptionFind the contiguous subarray within an array (containing at least one number) which has the largest product.For examp

2017-05-20 15:18:57 192

原创 [leetcode]324. Wiggle Sort II

题目链接:https://leetcode.com/problems/wiggle-sort-ii/#/descriptionGiven an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possi

2017-05-20 14:27:45 320

原创 [leetcode]229. Majority Element II

题目链接:https://leetcode.com/problems/majority-element-ii/#/descriptionGiven an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear ti

2017-05-19 11:58:56 208

原创 [leetcode]523. Continuous Subarray Sum

题目链接:https://leetcode.com/problems/continuous-subarray-sum/#/descriptionGiven a list ofnon-negativenumbers and a targetintegerk, write a function to check if the array has a continuous subar

2017-05-19 11:12:54 326

原创 [leetcode]464. Can I Win

题目链接:https://leetcode.com/problems/can-i-win/#/descriptionIn the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running to

2017-05-19 10:39:36 336

空空如也

空空如也

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

TA关注的人

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