自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

susandebug

厚积而薄发

  • 博客(19)
  • 资源 (5)
  • 收藏
  • 关注

转载 在乱序数组中寻找特定出现次数的数字——异或运算

在乱序数组中寻找特定出现次数的数字——异或运算题目:一个整型数组里除了两个数字之外,其他的数字都出现了两次。请写程序找出这两个只出现一次的数字。要求时间复杂度是O(n),空间复杂度是O(1)。分析:这是一道很新颖的关于位运算的面试题。首先我们考虑这个问题的一个简单版本:一个数组里除了一个数字之外,其他的数字都出现了两次。请写程序找出这个只出现一次的数字。这个题目

2015-10-28 15:57:14 2262

转载 提供给开发者 10 款最好的 Python IDE

提供给开发者 10 款最好的 Python IDEPython 非常易学,强大的编程语言。Python 包括高效高级的数据结构,提供简单且高效的面向对象编程。Python 的学习过程少不了 IDE 或者代码编辑器,或者集成的开发编辑器(IDE)。这些 Python 开发工具帮助开发者加快使用 Python 开发的速度,提高效率。高效的代码编辑器或者 IDE 应该会提供插件,工具

2015-10-27 19:37:24 763

原创 LeetCode题解——Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, return 5.

2015-10-27 15:05:40 628

原创 LeetCode题解——Number of Digit One

Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6, because digit 1 occurred in the follow

2015-10-27 14:22:23 487

原创 LeetCode题解——Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.出现0的情况是,出现5和2的倍数。[n/k]代表1~n中能被k整除的个数,而能被2整除的个数多余能被5整除的个数,故只要知道

2015-10-27 11:21:54 490

原创 LeetCode题解——Count Primes

escription:Count the number of prime numbers less than a non-negative number, n.Hint:Let's start with a isPrime function. To determine if a number is prime, we need to check if it is

2015-10-26 21:29:03 661

原创 LeetCode题解——Ugly Number II

Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the first

2015-10-22 19:48:23 526

原创 LeetCode题解——Happy Number

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2015-10-22 19:37:26 511

转载 最小的k个数

面试题 30,最小的k个数,堆解法和快速选择解法。 (附最大堆的插入/删除操作实现)这道题最简单的思路是排序,时间复杂度是O(nlog(n))。但是这样做在那n-k 个数的排序上浪费了资源。改进一下,将数组的前k个数作为最小的k数的缓存。从第k+1个数开始遍历,如果有比前k个数小的,就将其和前k个数那个较大交换。照这个思路,可以引入一个结构,使得前k个数总是最大的数在第一个

2015-10-22 19:32:04 502

原创 批量地导入本地的scholar.enw到endnote

批量地导入本地的scholar.enw到endnoteEndNote 软件对于科研工作者来说,它是亲密无间的得力助手。可是,有时候也会有不尽人意的事情发生,比如在导入从谷歌学术精挑细选之后下载的的scholar.enw文件到EndNote中的时候,一条一条的按部就班地重复导入工作会让人很心力交瘁,心烦气躁,尤其是在文献导入量很大的时候。今天,带领大家一起学习《批量地导入本地硬盘

2015-10-22 08:48:38 4511

原创 LeetCode题解——Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.此题可以用来求两个大数相乘。思路:逐位相乘处理进位法。假设

2015-10-16 16:54:49 472

原创 LeetCode题解——Plus One

Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.思路:从尾到头逐位遍历字符串,如果当前字

2015-10-16 14:38:26 492

原创 LeetCode题解——Add Binary

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".思路:最直接的想法,从最后一位开始,逐位运算。class Solution {public://特殊输入:空字符串,10+1;11+11,1111+11

2015-10-16 14:32:35 543

转载 关于与运算和取余之间的关系

一个数和3进行与运算,就是对4取余.解释:    和3进行与运算,是取该数2进制形式的最后2位的值,因为3的二进制形式是(假设该数用1个字节表示,多个字节也一样,这里为了讲述,暂举1个字节为例)00000011,最后两位和1进行与,则把该数最后2位的状态取出来(和1与的特性,不理解的话复习数字逻辑基础).如下推导:随便举一个数255,其二进制形式是11111111,根据十进制和二进制之

2015-10-14 19:34:06 2986 2

转载 机器学习的11个开源项目

机器学习是目前数据分析领域的一个热点内容,在平时的学习和生活中经常会用到各种各样的机器学习算法。实际上,基于Python、Java等的很多机器学习算法基本都被前人实现过很多次了。这些算法在网上可以找到很多,然而往往存在很多“脏”或者“乱”的开源代码。在这样的背景下, InfoWorld近日公布了机器学习领域11个最受欢迎的开源项目,这11个开源项目大多与垃圾邮件过滤、人脸识别、推荐引擎相关

2015-10-13 09:54:15 1019

转载 【基础】常用的机器学习&数据挖掘知识点

Basis(基础):MSE(Mean Square Error 均方误差),LMS(LeastMean Square 最小均方),LSM(Least Square Methods 最小二乘法),MLE(MaximumLikelihood Estimation最大似然估计),QP(Quadratic Programming 二次规划), CP(Conditional Probability条

2015-10-13 09:52:08 695

转载 国外牛人总结的机器学习领域的框架、库以及软件

本文汇编了一些机器学习领域的框架、库以及软件(按编程语言排序)。C++计算机视觉CCV —基于C语言/提供缓存/核心的机器视觉库,新颖的机器视觉库OpenCV—它提供C++, C, Python, Java 以及 MATLAB接口,并支持Windows, Linux, Android and Mac OS操作系统。通用机器学习MLPackDLib

2015-10-13 09:49:35 5252 2

原创 组合优化问题求解方法GA-交叉算子的总结

离散的组合优化问题:通过数学方法的研究去寻找离散事件的最优编排分组、次序或者筛选等。这些问题的描述都非常简单,并且具有很强的工程性,但最优化的求解很困难。 组合优化问题具有一个共同的特点,就是爆炸式增长的候选集(组合爆炸),例如对于旅行商问题而言,其候选集的数量为(N-1)!,其中N为城市的数目。对于这种NP-hard问题,如果采用穷举遍历,那么消耗的时间是指数级增长的,因此解决大规模的T

2015-10-11 20:34:56 15194 2

原创 LeetCode题解——Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node's key.Th

2015-10-08 11:25:55 449

查找算法代码C++——包括顺序、二分、BST、哈希

用C++写的最全的查找算法,顺序查找,二分查找,BST查找,哈希查找,可用于学习查找算法

2015-06-26

数据挖掘概念与技术课后习题答案.pdf

数据挖掘概念与技术课后习题答案.pdf 全套 完整答案 英文版 考试必备

2015-05-24

cuda 作业 排序算法 sort

中科院 cuda 作业 排序算法 sort

2015-05-24

cuda 高性能计算作业 点乘 dot

中科院 高性能课程 cuda优化并行点乘

2015-05-24

空空如也

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

TA关注的人

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