自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(43)
  • 资源 (1)
  • 收藏
  • 关注

原创 中山大学转专业过程及心得

本人14级,从化学院转专业到数据院(当年的信科)。适逢有挺多师弟师妹咨询转专业的过程,就把当时转专业的经历和过程概述一下,希望能有所帮助。[但是每年的政策可能都有变化,仅供参考!!] Part1: 转专业要求不同专业的要求不太一样,我们当年岭院、管院和数学院对绩点有单独的要求,其余学院我记得是没有的。剩下的笔试有些有,面试则是所有学院都有。[绩点要求]虽然大部分院没有明确说明,

2017-02-24 00:35:15 15744 4

原创 LeetCode解题报告 406. Queue Reconstruction by Height [medium]

题目描述Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in

2017-01-07 18:07:39 416

原创 LeetCode解题报告 399. Evaluate Division [medium]

题目要求Equations are given in the format A / B = k, where  A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers.

2017-01-06 09:09:43 459

原创 《算法概论》第八章NP完全问题——8.19习题解

题目描述题解首先图示说明一下什么是风筝图,如下就是一个n=

2017-01-05 21:29:26 1260

原创 《算法概论》第八章NP完全问题——8.16习题解

题目要求书后习题截图如下:解题题目看似比较长,读完之后还是很好理解的,并且题目已经给出了指导性方向,就是将烹饪实验的问题转化为3SAT问题的形式。烹饪问题的输入就是一个类似上图中5*5的矩阵,还有一个负面影响值p,输出为满足首先回顾一下3SAT问题。3SAT问题是SAT问题的一个特例,而SAT问题全称为Boolen Satisfiability问题,即布尔可

2017-01-05 19:26:56 820

原创 LeetCode解题报告 322. Coin Change [medium]

题目描述You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount

2017-01-05 14:38:56 309

原创 LeetCode解题报告 257. Binary Tree Paths [easy]

题目要求Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]

2017-01-04 23:21:56 224

原创 LeetCode解题报告 110. Balanced Binary Tree [easy]

题目要求Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node n

2017-01-04 22:11:39 268

原创 LeetCode解题报告 111. Minimum Depth of Binary Tree [easy]

题目要求Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.解题思路找二叉树的最短路径。和我之前做的

2017-01-04 21:20:00 281

原创 LeetCode解题报告 107. Binary Tree Level Order Traversal II [easy]

题目要求Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree [3,9,20,n

2017-01-04 20:36:06 238

原创 LeetCode解题报告 112. Path Sum [easy]

题目要求Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tre

2017-01-03 11:13:01 264

原创 LeetCode解题报告 96. Unique Binary Search Trees [medium]

题目要求Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3 3 2

2017-01-02 23:48:10 344

原创 LeetCode解题报告 55. Jump Game [medium]

题目描述Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position. 

2016-12-30 15:06:15 208

原创 LeetCode解题报告 199. Binary Tree Right Side View [medium]

题目描述Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Given the following binary tre

2016-12-24 00:39:02 262

原创 LeetCode解题报告 383. Ransom Note [easy]

题目描述Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the maga

2016-12-23 01:05:13 222

原创 LeetCode解题报告 344. Reverse String [easy]

题目要求Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".解题思路逆转一个字符串,注意空格就行。复杂度分析时间复杂度O(n)。代码如下:cla

2016-12-23 01:02:06 262

原创 LeetCode解题报告 445. Add Two Numbers II [medium]

题目描述You are given two linked lists representing two non-negative numbers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return it

2016-12-23 00:07:57 689

原创 LeetCode解题报告 349. Intersection of Two Arrays [easy]

题目描述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 uniq

2016-12-21 00:49:42 355

原创 LeetCode解题报告 394. Decode String [medium]

题目描述Given an encoded string, return it's decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note

2016-12-20 10:03:55 248

原创 LeetCode解题报告 108. Convert Sorted Array to Binary Search Tree [medium]

题目描述Given an array where elements are sorted in ascending order, convert it to a height balanced BST.解题思路题目要求对一个已经排好序的数组来构造一颗平衡二叉树。平衡二叉树指的是对于树上任意一个节点,其左右子树的高度差不超过1。若两颗子树节点数量相同,且使用同

2016-12-20 00:44:38 192

原创 LeetCode解题报告 452. Minimum Number of Arrows to Burst Balloons [medium]

题目描述There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the horizontal diameter. Since it's horizontal, y

2016-12-18 01:02:21 356

原创 LeetCode解题报告 279. Perfect Squares [medium]

题目描述Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.For example, given n = 12, return 3 because 12 = 4 + 4 + 4;

2016-12-17 00:52:52 546

原创 LeetCode解题报告 120. Triangle [medium]

题目描述Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [

2016-12-03 15:07:46 345

原创 LeetCode解题报告 241. Different Ways to Add Parentheses [medium]

题目描述Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Exa

2016-11-27 13:22:49 289

原创 LeetCode解题报告 102. Binary Tree Level Order Traversal [easy]

题目描述Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree [3,9,20,null,null,15,7], 3

2016-11-25 21:53:57 198

原创 MAC上libsvm的使用详解[折腾好久]

网上大部分文章都是在windows下如何使用的教程,自己摸索加上各种谷歌,终于搞定。参数选择工具prid.py在mac下的使用尤其折腾。

2016-11-25 16:26:38 5333 4

原创 LeetCode解题报告 104. Maximum Depth of Binary Tree [easy]

题目描述Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.解题思路题目要求返回一个二叉树的最大深度。

2016-11-25 13:16:54 296

原创 LeetCode解题报告 455. Assign Cookies [easy]

题目描述Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum s

2016-11-24 23:44:42 225

原创 LeetCode解题报告 122. Best Time to Buy and Sell Stock II [medium]

题目描述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

2016-11-07 11:49:19 224

原创 LeetCode解题报告 309. Best Time to Buy and Sell Stock with Cooldown[medium]

有限状态机三个状态f0[i]:第i天过后处于状态0时的最大收益f1[i]:第i天过后处于状态1时的最大收益f2[i]:第i天过后处于状态2时的最大收益f0[1]=0f1[1]=-1 买进来还没有卖掉f2[1]=负无穷i>1时:f0[i]=max(f0[i-1],f2[i-1])f1[i]=max( f1[i-1], f0[i-1]

2016-10-26 21:00:36 296

原创 LeetCode解题报告 377. Combination Sum IV [medium]

类似完全背包问题(可重复背包)f[0]=1f[i] 组成和为i的方案数f[i]=求和(f[j-nums[i])(对于示例中的数值:   最后一个为1时,求有多少个组成和为4-1=3的方案数;   最后一个为2时,求有多少个组成和为4-2=2的方案数;   最后一个为3时,求有多少个组成和为4-3=1的方案数;)return f[target]

2016-10-26 20:00:17 318

原创 LeetCode解题报告 392. Is Subsequence [medium]

题目描述Given a string s and a string t, check if s is subsequence of t.You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,

2016-10-26 17:09:57 272

原创 LeetCode解题报告 343. Integer Break [medium]

题目描述Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, return 1 (2 = 1 + 1); given n = 10, return 36 (10 = 3 +

2016-10-26 15:44:01 267

原创 LeetCode解题报告 357. Count Numbers with Unique Digits [medium]

题目描述Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n.Example:Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x [11

2016-10-26 14:58:30 232

原创 LeetCode解题报告 413. Arithmetic Slices [medium]

题目描述A sequence of number 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 arithmet

2016-10-26 14:01:41 453

原创 LeetCode解题报告 338. Counting Bits [medium]

题目描述Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:F

2016-10-21 13:28:16 470

原创 LeetCode解题报告 70. Climbing Stairs [easy]

题目描述You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?解题思路题目意思

2016-10-21 11:52:26 406

原创 LeetCode解题报告 101. Symmetric Tree [easy]

题目描述Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3

2016-10-13 13:30:28 244

原创 LeetCode解题报告 100. Same Tree [easy]

题目描述Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.解题

2016-10-01 22:14:22 257

原创 LeetCode解题报告 53. Maximum Subarray [medium]

题目描述Find the contiguous subarray within an array (containing at least one number) which has the largest sum.Example: given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,2

2016-09-17 00:13:30 238

libsvm格式转换excel宏

libsvm数据转化excel宏文件,一键转化

2016-11-25

空空如也

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

TA关注的人

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