自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Yingying

你必须非常努力,才能看起来毫不费力

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

转载 deep learning and 流型学习

deeplearning  github  :https://github.com/wepe/MachineLearning流型学习:http://blog.csdn.net/u012162613/article/details/45920827

2017-02-27 17:28:47 486

转载 t-SNE

http://bindog.github.io/blog/2016/06/04/from-sne-to-tsne-to-largevis

2017-02-27 17:08:04 267

转载 Array和Arraylist的区别

1)精辟阐述:可以将 ArrayList想象成一种“会自动扩增容量的Array”。2)Array([]):最高效;但是其容量固定且无法动态改变;     ArrayList:  容量可动态增长;但牺牲效率;3)建议:基于效率和类型检验,应尽可能使用Array,无法确定数组大小时才使用ArrayList!不过当你试着解决更一般化的问题时,Array的功能就可能过于受限

2017-02-26 18:39:47 254

原创 295. Find Median from Data Stream***

Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.Examples: [2,3,4] , the median

2017-02-26 18:36:12 269

原创 450. Delete Node in a BST**

Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.Basically, the deletion can be divided i

2017-02-26 16:32:40 238

原创 201. Bitwise AND of Numbers Range**

Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4.public class Solution { public int rangeBitwiseAnd(int m, int n) { if(m==0) return 0;

2017-02-26 14:22:38 256

原创 81. Search in Rotated Sorted Array II**

Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose an array sorted in ascending order is rotated at

2017-02-26 14:09:36 216

原创 315. Count of Smaller Numbers After Self***

You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i].Example

2017-02-26 13:37:46 223

原创 330. Patching Array***

Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n]inclusive can be formed by the sum of some elements in the array. Ret

2017-02-26 11:04:30 226

原创 193. Valid Phone Numbers

Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers.You may assume that a valid phone number must appear

2017-02-25 22:10:24 196

原创 449. Serialize and Deserialize BST**

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be

2017-02-25 21:57:15 252

原创 385. Mini Parser**

Given a nested list of integers represented as a string, implement a parser to deserialize it.Each element is either an integer, or a list -- whose elements may also be integers or other lists.

2017-02-25 21:23:41 278

原创 446. Arithmetic Slices II - Subsequence***

A sequence of numbers is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.For example, these are arithmetic sequen

2017-02-25 20:15:40 383

原创 待总结 机器学习

贝叶斯判决决策树和随机森林逻辑斯蒂回归支持向量机adaboost神经网络

2017-02-11 13:57:41 206

原创 Divide and conquer 总结

53. Maximum Subarray:最大和子数组169. Majority Element:求众数。241. Different Ways to Add Parentheses:一个运算表达式,加括号的不同方式。215. Kth Largest Element in an Array:第k大的元素。240. Search a 2D Matrix II:

2017-02-11 12:01:46 388

原创 Heap 总结

451. Sort Characters By Frequency:根据单词中字母的出现频率排序。347. Top K Frequent Elements:找到数组中出现频率前K高的元素。同451题。373. Find K Pairs with Smallest Sums**:找到两个数组中任意元素组合形成的前k个最大和对。215. Kth Largest Elemen

2017-02-10 23:24:52 289

转载 313. Super Ugly Number**

Write a program to find the nth super ugly number.Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8, 13,

2017-02-10 23:05:50 338

转载 Java容器类默认初始容量研究

转载自:http://blog.csdn.net/mdifferent/article/details/51261403昨天参加了个公司的Java Performance的培训,其间提到了一些容器类的构造函数有默认的参数,用来控制容器的初始容量,建议是尽可能准确地预测容量需求,根据需求创建指定大小的容器,而不是使用默认的容量,这样可以有效减少内存的浪费,以及扩容所带来的开销。培训中主要提到

2017-02-10 22:13:12 500

原创 23. Merge k Sorted Lists***

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.My code:public class Solution { public ListNode mergeKLists(ListNode[] lists) { Prio

2017-02-10 21:56:37 247

转载 Java 8 λ表达式

转载自:http://blog.csdn.net/ioriogami/article/details/12782141/1. 什么是λ表达式 λ表达式本质上是一个匿名方法。让我们来看下面这个例子:    public int add(int x, int y) {        return x + y;    }转成λ表达式后是这个样子:        (in

2017-02-10 21:18:41 397

原创 Stack 总结

225. Implement Stack using Queues:用队列实现栈。232. Implement Queue using Stacks:用栈实现队列。20. Valid Parentheses:看是否为有效的括号。

2017-02-10 19:56:15 255

转载 银行研发中心

http://blog.csdn.net/toughhou/article/details/67041581.1. 人行:2004年初,北京城南人行软件开发基地,大兴西红门,金电公司软件开发中心软件开发中心作为人行的下属机构,人民银行的主要业务要交给软件开发中心来完成。但并非垄断人民银行的业务。一些重大项目要在全社会招标,但软件中心同等优先。A.开发中心成立时的背景

2017-02-10 00:54:20 3481

转载 Tree

102. Binary Tree Level Order Traversal:二叉树层次遍历。从上到下。107. Binary Tree Level Order Traversal II:二叉树层次遍历,从下到上。改变结果list顺序即可。层次遍历:public List> levelOrder(TreeNode root) { Queue queue = new Li

2017-02-09 19:19:39 305

原创 113. Path Sum II**

Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum = 22, 5 / \

2017-02-08 21:03:10 243

原创 Java String

String:String str = "abc";is equivalent to: char data[] = {'a', 'b', 'c'}; String str = new String(data);

2017-02-08 13:52:13 172

转载 字符编码(unicode编码)

1. ASCII(American Standard Code for Information Interchange)美国信息交换标准代码,这是计算机上最早使用的通用的编码方案。那个时候计算机还只是拉丁文字的专利,根本没有想到现在计算机的发展势头,如果想到了,可能一开始就会使用unicode了。当时绝大部分专家都认为,要用计算机,必须熟练掌握英文。这种编码占用7个Bit,在计算机中占用一

2017-02-08 12:41:35 1803

原创 String

67. Add Binary:两个二进制表示的字符串相加。结果仍然是二进制字符串形式。完美。383. Ransom Note:判断一个字符串是不是另外一个字符串的子串,可以不相邻。用hashmap做很方便。完美。345. Reverse Vowels of a String:字符串中元音反转,用two pointers做很方便。344. Reverse String:反

2017-02-08 10:21:40 220

转载 String 和 int转换

Reference第一种方法:s=i+"";   //会产生两个String对象第二种方法:s=String.valueOf(i); //直接使用String类的静态方法,只产生一个对象第一种方法:i=Integer.parseInt(s);//直接使用静态方法,不会产生多余的对象,但会抛出异常第二种方法:i=Integer.valueOf(s).intValue();

2017-02-07 22:12:36 193

原创 Binary Search

367. Valid Perfect Square:判断某个数是否为完全平方数,不准使用sqrt等内置函数。Binary search 用来缩小范围。441. Arranging Coins:把硬币摆成楼梯的形状,求解最多完成的完整楼梯层数。和367完全一样。167. Two Sum II - Input array is sorted:在排序后的数组中查找两个数,和为目标target

2017-02-07 16:46:14 301

原创 Two pointers

167. Two Sum II - Input array is sorted:序列已经被排序,找出来两个数的和为target。左右两个指针,依次移动查找。88. Merge Sorted Array:合并两个已排序数组。要求不使用extra space。从后往前。349. Intersection of Two Arrays:求两个数组交集。使用hashset很方便。或者对两

2017-02-07 15:21:04 343

原创 Linked list

141. Linked List Cycle: 判断linked list中间是否包含一个环。改变原来的链表。设置标志位,即head,如果next找到head,就含cycle。237. Delete Node in a Linked List:删除linkedlist中某个元素。注意引用传递和参数传递的区别。237. Delete Node in a Linked List:删除重

2017-02-06 23:19:46 268

转载 java 对象引用

转载自:原文关键字: java对象 引用Java对象及其引用关于对象与引用之间的一些基本概念。       初学Java时,在很长一段时间里,总觉得基本概念很模糊。后来才知道,在许多Java书中,把对象和对象的引用混为一谈。可是,如果我分不清对象与对象引用,       那实在没法很好地理解下面的面向对象技术。把自己的一点认识写下来,或许能让初学Java的朋友们少走一点弯路。

2017-02-06 21:50:17 161

原创 349. Intersection of Two Arrays*

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each element in the result must be unique.The res

2017-02-05 22:25:17 451

原创 Hash table

205. Isomorphic Strings:一个字符串中更换某些字符进行映射为另外一个字符串。利用hashmap保存一一映射关系。注意有时候映射可以利用数组实现。1. Two Sum:找到序列中和为固定值的两个元素坐标。利用hashmap很方便。217. Contains Duplicate:找到list中是否包含两个相同的元素。直接利用hashmap查询即可。219.

2017-02-05 20:49:30 307

原创 1. Two Sum*

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-02-05 20:26:19 207

原创 Backtracking

401. Binary Watch: 小时、分钟二进制表示中1的个数。遍历,满足要求放在结果list中。

2017-02-05 19:48:05 252

原创 Dynamic programming 4

377. Combination Sum IV:给定一个序列,求组成某个和的种类数。494. Target Sum:一个序列,在每个元素前面加正负号,若结果为target有效。求有效种类数。分类讨论,当前为正还是负。技巧:剩余的数和小于某target,该组合无效返回。62. Unique Paths:二维矩阵,求path条数。和之前304. Range Sum Query 2D 相

2017-02-03 16:20:36 305

原创 Dynamic programming 3

198. House Robber: 对于某个房间是否进行rob,考虑上个房间被rob此房间不被rob,上个房间不被rob此房间被rob的最大值。

2017-02-01 23:06:17 246

原创 95. Unique Binary Search Trees II

Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all 5 unique BST's shown below. 1

2017-02-01 21:57:10 196

原创 337. House Robber III**

The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a tour

2017-02-01 14:20:20 225

空空如也

空空如也

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

TA关注的人

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