自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 资源 (5)
  • 收藏
  • 关注

原创 LeetCode 236. Lowest Common Ancestor of a Binary Tree

description: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between

2017-01-26 15:21:14 186

原创 LeetCode 235 Lowest Common Ancestor of a Binary Search Tree

description: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defin

2017-01-26 11:32:49 183

原创 LeetCode 114. Flatten Binary Tree to Linked List

description: Given a binary tree, flatten it to a linked list in-place.For example, Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like: 1 \ 2

2017-01-26 10:56:40 162

原创 LeetCode 111. minimum depth of binary tree

description: 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.感觉这到题要比 maxmum depth of bin

2017-01-25 15:15:44 359

转载 Sublime Text 3 3126 注册码

Sublime Text 3 3126 注册码第一个测试通过—– BEGIN LICENSE —– Michael Barnes Single User License EA7E-821385 8A353C41 872A0D5C DF9B2950 AFF6F667 C458EA6D 8EA3C286 98D1D650 131A97AB AA919AEC EF20E143 B361B1E7

2017-01-25 10:26:55 668

原创 LeetCode 110. Balanced Binary Tree

题目要求: 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 never di

2017-01-24 17:10:25 381

原创 LintCode Minimum Subtree java solution

description Given a binary tree, find the subtree with minimum sum. Return the root of the subtree.NoticeLintCode will print the subtree which root is your return node. It’s guaranteed that there is

2017-01-24 15:59:48 1139

原创 LeetCode 257. Binary Tree Paths

description: Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree:1 / \ 2 3 \ 5 All root-to-leaf paths are:[“1->2->5”, “1->3”]解题思路: 题目并不难,可以直

2017-01-23 21:53:39 290

原创 LeetCode 104. Maximum Depth of Binary Tree java soluiton

题目要求: 寻找二叉树的最大树深/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public cl

2017-01-23 16:20:57 258

原创 LeetCode 145. Binary Tree Postorder Traversal java solution

题目要求: Given a binary tree, return the postorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1].Note: Recursive solution is

2017-01-23 14:00:31 259

原创 LeetCode 94. Binary Tree Inorder Traversal java solution

题目要求: Given a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,3,2].Note: Recursive solution is

2017-01-23 13:51:47 217

原创 LeetCode 144. Binary Tree Preorder Traversal

题目要求: Given a binary tree, return the preorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3].Note: Recursive solution is t

2017-01-23 12:07:52 240

原创 LeetCode33. Search in Rotated Sorted Array java solution

description: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If f

2017-01-22 17:33:24 300

原创 LintCode Wood Cut java solution

题目要求: Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the same length. What is the longest length you c

2017-01-22 00:13:47 525

原创 LeetCode find the peak element

题目要求: There is an integer array which has the following features:The numbers in adjacent positions are different. A[0] < A[1] && A[A.length - 2] > A[A.length - 1]. We define a position P is a peek i

2017-01-21 22:42:11 219

原创 leetcode find-minimum-in-rotated-sorted-array java solution use binary search algorithm

题目要求: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicat

2017-01-21 21:25:41 215

原创 LeetCode278 find the first bad version

Describtion You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is develo

2017-01-21 17:03:32 280

原创 LeeCode Search in a Big Sorted Array java solution use binary search algorithm

题目要求: Given a big sorted array with positive integers sorted by ascending order. The array is so big so that you can not get the length of the whole array directly, and you can only access the kth num

2017-01-21 10:20:54 1272

原创 LeetCode069 sqrtx java solution

题目要求: Implement int sqrt(int x). Compute and return the square root of x.解题思路: 使用binary search的方法进行处理public class Solution { public int mySqrt(int x) { if (x == 0 || x == 1) {

2017-01-20 17:29:56 260

原创 经典的二分法

Find any position of a target number in a sorted array. Return -1 if target does not exist.Example Given [1, 2, 2, 4, 5, 5].For target = 2, return 1 or 2.For target = 5, return 4 or 5.For target = 6,

2017-01-20 14:38:27 349

原创 LeetCode find the first/last position(java solution)

题目要求: 给一个升序数组,找到target最后一次出现的位置,如果没出现过返回-1样例 给出 [1, 2, 2, 4, 5, 5].target = 2, 返回 2.target = 5, 返回 5.target = 6, 返回 -1.解题思路: 使用二分法进行计算处理public class Solution { public int lastPosition(int[] nums

2017-01-20 13:55:29 715

原创 LeetCode strStr java solution (use rabin karp)

题目要求: Implement strStr function in O(n + m) time.strStr return the first index of the target string in a source string. The length of the target string is m and the length of the source string is n.

2017-01-19 13:00:23 554

原创 leetcode 实现hash-function java solution

题目要求: 在数据结构中,哈希函数是用来将一个字符串(或任何其他类型)转化为小于哈希表大小且大于等于零的整数。一个好的哈希函数可以尽可能少地产生冲突。一种广泛使用的哈希函数算法是使用数值33,假设任何字符串都是基于33的一个大整数,比如:hashcode(“abcd”) = (ascii(a) * 333 + ascii(b) * 332 + ascii(c) *33 + ascii(d)) %

2017-01-19 10:10:07 668

原创 Helmholtz方程与Maxwell方程在光通信中的相关应用

Helmholtz方程与Maxwell方程在光通信中的相关应用【摘要】Helmholtz方程和Maxwell 方程组出现在地球物理、医学、遥感技术等众多领域,经常被用来刻画声波或电磁波的辐射和散射,以及建筑物的振动等现象,是典型的偏微分方程。与偏微分方程边值问题相比,我们不需要去除 拉普莱斯算子的特征值就可以保证Cauchy 问题解的唯一性。然而Cauchy 问题是不稳定的, 如果测量的Cau

2017-01-18 22:18:36 2486 1

原创 LeetCode 90.Subset II java solution

题目要求:Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1,

2017-01-18 17:00:40 266

原创 LeetCode78. Subsets java solution

题目要求:Given a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a solution is

2017-01-18 15:30:13 193

原创 Python读写文件

Python读写文件 1.open 使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。file_object = open(‘thefile.txt’) try: all_the_text = file_object.read( ) finally: file_object.close( )注:

2017-01-13 14:22:26 516

原创 c语言获取系统时间的几种方式

c语言获取系统时间的几种方式 C语言中如何获取时间?精度如何? 1 使用time_t time( time_t * timer ) 精确到秒2 使用clock_t clock() 得到的是CPU时间 精确到1/CLOCKS_PER_SEC秒3 计算时间差使用double difftime( time_t timer1, time_t timer0 )4 使用DWORD Ge

2017-01-12 15:39:21 11243

原创 研究生“计算机通信新技术”课程复习题(2016年)

研究生“计算机通信新技术”课程复习题(2016年)帮师姐终结的, 现在贡献出来. internet的分享精神1、       现代通信网技术综述1、 通信网的分层结构是怎样的?通信网的三要素是什么?分层结构:应用层-业务层-传送层      应用层:表示各种信息应用于服务种类。 业务网层:表示支持各种信息服务的业务提供手段和装备,它是现代通信网的主题,是向用户提供诸如电话、

2017-01-11 14:29:43 9038

原创 python的一些小问题

该文章不定期更新(1). no newline at the end of file:在代码的最后一行,添加回车即可

2017-01-09 19:49:38 421

转载 各种读写方式的区别

不管何种语言在进行文件读写时,大家都知道有以下模式: r,rb,w,wb 那么在读写文件时,有无b标识的的主要区别在哪里呢? 1.文件使用方式标识'r':默认值,表示从文件读取数据。'w':表示要向文件写入数据,并截断以前的内容'a':表示要向文件写入数据,添加到当前内容尾部'r+':表示对文件进行可读写操作(删除以前的所有数据)'r+a':表示对文件可进行读写操作(添加到当前

2017-01-09 15:26:17 1018

原创 python读取excel文件

一、安装xlrd模块   到python官网下载http://pypi.python.org/pypi/xlrd模块安装,前提是已经安装了python 环境。二、使用介绍  1、导入模块      import xlrd   2、打开Excel文件读取数据       data = xlrd.open_workbook('excelF

2017-01-09 14:03:08 927

原创 numpy基本用法

对于python中的numpy模块,一般用其提供的ndarray对象。 创建一个ndarray对象很简单,只要将一个list作为参数即可。 例如 import numpy as np #引入numpy库#创建一维的narray对象a = np.array([1,2,3,4,5])#创建二维的narray对象a2 = np.array([[1,2,3,4,5]

2017-01-04 11:49:50 19421

原创 常用形态学操作函数

常用形态学操作函数(转自:http://blog.sina.com.cn/s/blog_4c52e9e20100e5if.html)1、dilate函数该函数能够实现二值图像的膨胀操作,有以下形式:BW2=dilate(BW1,SE)BW2=dilate(BW1,SE,…,n)其中:BW2=dilate(BW1,SE)表示使用二值结构要素矩阵SE队图像数据矩阵BW1执行膨胀操作。输入图像BW1的类型

2017-01-02 19:52:20 557

原创 常用形态学操作函数

常用形态学操作函数(转自:http://blog.sina.com.cn/s/blog_4c52e9e20100e5if.html)1、dilate函数该函数能够实现二值图像的膨胀操作,有以下形式:BW2=dilate(BW1,SE)BW2=dilate(BW1,SE,…,n)其中:BW2=dilate(BW1,SE)表示使用二值结构要素矩阵SE队图像数据矩

2017-01-02 19:51:19 759

转载 matlab 形态学函数的应用

Matlab DIP(瓦)ch9形态学图像处理    本章的练习主要是形态学的一些基本概念和技术,这些构成了一组提取图像特征的有力工具,针对二值图像和灰度图像的腐蚀、膨胀和重构的基本操作可以组合使用,以执行非常宽泛的任务。其练习代码和结果如下:  1 %% 第9章 形态学处理 2 3 %% imdilate膨胀 4 clc 5 clear 6

2017-01-02 19:43:59 1491

原创 OFDM系统的关键技术及分析

OFDM系统的关键技术及分析【摘要】正交频分复用(OFDM)技术以其频谱利用率高、抗多径和脉冲噪声、在高效带宽利用率情况下的高速传输能力、根据信道条件对子载波进行灵活调制及功率分配的能力,己在数字音频广播、数字电视以及无线局域网等无线高速数据传输系统中广泛应用,并成为第四代移动通信的关键技术之一。本课程论文主要涉及了OFDM系统中的FFT/IFFT、时钟同步、循环前缀、频偏估计、峰平比等关键技

2017-01-02 17:31:14 25808 45

原创 基于Hessian的血管增强算法

基于Hessian滤波器的血管增强算法这几天写了做了一个血管分析的小项目,其中用到了基于Hessian滤波器的血管增强算法,将算法的源代码上传。先占个坑,以后再来写分析。(考试周ing)资源位置。http://download.csdn.net/detail/sinat_32547403/9726970

2017-01-02 16:27:07 4093 4

机器学习(吴恩达)week2编程作业

机器学习(吴恩达)week2编程作业

2017-07-23

研究生“计算机通信新技术”课程复习题(2016年)

研究生“计算机通信新技术”课程复习题(2016年)

2017-01-11

基于Hessian滤波器的血管增强算法

基于Hessian滤波器的血管增强算法

2017-01-02

颜色相关图

颜色相关图

2015-11-07

空空如也

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

TA关注的人

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