自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 算法概论课后习题8.3

STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer k, find a satisfying assignment in which at most k variables are true, if such an assi

2017-06-26 13:40:38 386

原创 leetcode week18

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,2,1] 

2017-06-21 14:08:01 261

原创 leetcode week17

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with

2017-06-20 17:05:49 278

原创 leetcode week16

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before c

2017-06-20 15:18:50 263

原创 leetcode week15

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.问题描述:罗马数字转成数字的问题解题思路:罗马数字分一下几种1~9: {"I", "II", "III", "IV", "V", "VI", "VII"

2017-06-20 14:52:18 273

原创 leetcode week14

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.问题描述:问题比较简单,就是两个排好序的链表,要要把他们合并起来变成一个链表,并且也是排好序的。解题思路:解题

2017-06-02 17:43:38 210

原创 leetcode week13

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-dim

2017-05-23 15:50:48 327

原创 leetcode week12

Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.

2017-05-15 13:35:05 270

原创 leetcode week11

Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the ta

2017-05-08 12:43:15 209

原创 leetcode week 10

Given a string containing just the characters '(', ')','{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all valid b

2017-05-08 12:06:08 183

原创 leetcode week9

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I

2017-04-25 23:06:11 203

翻译 Word2Vec (Part 2): NLP With Deep Learning with Tensorflow (CBOW)

Tensorflow上其实本来已经有word2vec的代码了,但是我第一次看的时候也是看得云里雾里,还是看得不太明白。并且官方文档中只有word2vec的skip-gram实现,所以google了一下,发现了这两篇好文章,好像也没看到中文版本,本着学习的态度,决定翻译一下,一来加深一下自己的理解,二来也可以方便一下别人。第一次翻译,如有不当,欢迎指出。    原文章地址:    Word2

2017-04-14 12:01:02 1786

翻译 Word2Vec (Part 1): NLP With Deep Learning with Tensorflow (Skip-gram)

Tensorflow上其实本来已经有word2vec的代码了,但是我第一次看的时候也是看得云里雾里,还是看得不太明白。并且官方文档中只有word2vec的skip-gram实现,所以google了一下,发现了这两篇好文章,好像也没看到中文版本,本着学习的态度,决定翻译一下,一来加深一下自己的理解,二来也可以方便一下别人。第一次翻译,如有不当,欢迎指出。    原文章地址:    Word2

2017-04-13 21:34:57 1909

原创 leetcode week8

Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.

2017-04-10 16:20:01 282

原创 leetcode week7

Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "

2017-04-10 15:22:51 214

原创 leetcode week6

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i

2017-04-10 14:14:37 211

原创 leetcode week5

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 use the sam

2017-04-10 13:16:50 210

原创 leetcode week4

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the range

2017-03-25 13:49:01 204

原创 leetcode week3

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.0 ≤ x, y < 2

2017-03-25 13:22:01 233

原创 leetcode week2

Determine whether an integer is a palindrome. Do this without extra space.问题描述:输入一个整数,判断其是否回文,即3223为回文,3224不是如此类推。要求不能使用额外空间。解题思路:首先要定义一下回文,按照题目的意思,整数之中,负数我们假定不为回文,然后小于10大于0的一位整数为回文。对于整数

2017-03-05 02:03:59 254

原创 leetcode week1

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

2017-02-26 23:40:45 236

原创 Python机器学习及NLP库

机器学习方面:Scikit-Learn 可用于分类、特征选择、特征提取和聚集。还拥有自然语言处理特征提取的能力、词袋、tf-idf算法、预处理等。Matplotlib 可以用于快速可视化。Statsmodels 主要用于预测性和探索性分析。可以拟合线性模型,进行统计分析或预测性建模。PyMC 做贝叶斯曲线的工具。Shogun 主要用于支持向量机(SVM)Gensim 用于主

2017-02-23 23:54:26 1719

原创 自然语言处理编程方面小笔记

数据结果的保存#a为一维或二维数组numpy.savetxt("filename.txt",a)b = numpy.loadtxt("filename.txt")

2017-02-23 17:10:46 245

原创 常用正则表达式

常用的正则表达式^abc 以abc开头的字符串abc& 以abc结尾的字符串.* 匹配任意长度字符(最长).*? 匹配任意长度字符(最短)\ 为转义字符,后面加上符号可以表示符号\d 任意数字持续更新...

2017-02-22 16:34:52 238

空空如也

空空如也

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

TA关注的人

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