自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

D.W 的专栏

深度学习、机器学习、知识图谱,读者可关注博主的个人公众号【斗码小院】,不定期分享相关知识

  • 博客(240)
  • 资源 (20)
  • 收藏
  • 关注

原创 Leetcode[129]-Sum Root to Leaf Numbers

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the total sum of al

2015-06-12 14:15:32 938

原创 LeetCode[155]-Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) – Push element x onto stack. pop() – Removes the element on top of the stack. top() – Get the

2015-06-12 08:56:37 996

原创 Leetcode[101]-Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the following is not

2015-06-11 23:00:32 850

原创 Leetcode[111]-Minimum Depth of Binary Tree

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.递归法:/** * Definition for a binary tree nod

2015-06-11 22:23:13 952

原创 Leetcode[94]-Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3return[1,3,2].递归遍历法:/** * Definition for a binary tree node

2015-06-11 20:23:17 864

原创 Leetcode[100]-Same Tree

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.思路:递归法判断 假设两棵树根结点为

2015-06-11 18:16:33 840

原创 Leetcode[104]-Maximum Depth of Binary Tree

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.求最大深度,用递归的方法/** * Definition for a binary

2015-06-11 17:17:45 854

原创 Leetcode[20]-Valid Parentheses

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 but "

2015-06-11 14:45:26 820

原创 Leetcode[125]-Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, "A man, a plan, a canal: Panama" is a palindrome. "race a car" is not a palindr

2015-06-11 14:12:35 916

原创 Leetcode[222]-Count Complete Tree Nodes

Given a complete binary tree, count the number of nodes.Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, except possibly the last, is completely filled, and

2015-06-11 13:24:18 2117

原创 Leetcode[74]-Search a 2D Matrix

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right. The first integer of each row is

2015-06-11 12:18:43 698

原创 Leetcode[4]-Median of Two Sorted Arrays

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).思路:先将两个数组合并,然后排序,最后找中位数中位数:若有n

2015-06-11 12:09:40 649

原创 Leetcode[154]-Find Minimum in Rotated Sorted Array II

Follow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed?Would this affect the run-time complexity? How and why? Suppose a sorted array is rotated at some pivot unknown to y

2015-06-11 11:04:25 794

原创 Leetcode[153]-Find Minimum in Rotated Sorted Array

Suppose a sorted array 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 duplicate exists in the array.方法一:直

2015-06-11 10:59:50 986

原创 Leetcode[162]-Find Peak Element

A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, in that case

2015-06-11 10:56:12 1405

原创 Leetcode[81]-Search for a Range

Given a sorted array of integers, 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 target is not found in the ar

2015-06-11 10:36:08 829

原创 Leetcode[33]-Search in Rotated Sorted Array

Suppose a sorted array 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 found in the array return its index

2015-06-11 10:17:51 1192

原创 Leetcode[35]-Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here

2015-06-11 09:07:15 575

原创 Leetcode[92]-Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass.For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note: Given m, n satisfy the following co

2015-06-10 22:41:01 701

原创 Leetcode[147]-Insertion Sort List

Sort a linked list using insertion sort.链表的插入排序思路:新开辟一个链表空间,用来作为插入排序的目标链。循环遍历原链表,对每个节点,让其从头到尾的在已经排好序的链表中找到插入位置(此处记录的是插入位置的前一个位置),然后将其插入进去即可。代码Code(c++):/** * Definition for singly-linked list. * stru

2015-06-10 21:23:29 655

原创 Leetcode[82]-Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example, Given 1->2->3->3->4->4->5, return1->2->5. Given 1->1->1->2-

2015-06-10 20:33:01 783

原创 Leetcode[83]-Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 比较简单,直接贴代码了!/** * Definition for

2015-06-10 20:06:51 765

原创 Leetcode[19]-Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked l

2015-06-10 19:58:39 766

原创 Leetcode[143]-Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes’ values.For example, Given {1,2,3,4}, reorder it to {1,4,2,3}

2015-06-10 18:57:41 1500

原创 Leetcode[86]-Partition List

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes in each of the

2015-06-10 14:08:35 1159

原创 Leetcode[21]-Merge Two Sorted Lists

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.思路:要求合并两个排好序的链表。开始我们初始化头front和尾tail,然后从两个单链表的头部比较两个单链表,两链表同时

2015-06-10 13:37:11 1050

原创 Leetcode[148]-Sort List

Sort a linked list in O(n log n) time using constant space complexity.分析:题目要求时间复杂度为O(nlogn),所以一开始想到的就是快速排序,但是快速排序一直AC不了,然后就想到用归并排序,没想到归并排序竟然可以。下面给出详细代码:归并排序需要做的 找到中间点 合并两个排好序的链表 递归实现归并排序 Code(c++):/**

2015-06-10 13:23:21 934

原创 Leetcode[141]-Linked List Cycle

Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?分析:设置两个临时指针,一个一次走一步,一个一次走两步,如果再次相遇,表示有环。Code(c++):/** * Definition for singly-linked list.

2015-06-10 11:08:51 1252

原创 Leetcode[203]-Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5Credits: Special thanks to @mithmatt for a

2015-06-10 10:22:16 762

原创 Leetcode[206]-Reverse Linked List

Reverse a singly linked list.Reverse a singly linked list.Hint: A linked list can be reversed either iteratively or recursively. Could you implement both?分析: /** * Definition for singly-linked list.

2015-06-10 09:53:28 947

原创 Leetcode[202]-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 of i

2015-06-09 22:30:10 3560

原创 Leetcode[136]-Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra me

2015-06-09 21:44:56 705

原创 Leetcode[36]-Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’. A partially filled sudoku whic

2015-06-09 21:09:12 641

原创 Leetcode[18]-4Sum

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: Elements in a quad

2015-06-09 19:21:18 597

原创 Leetcode[15]-3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: Elements in a triplet (a,b,c) must be i

2015-06-09 18:46:54 871

原创 Leetcode[1]-Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where in

2015-06-09 16:40:29 829

原创 Leetcode[66]-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-06-09 15:54:09 998

原创 Leetcode[219]-Contains Duplicate II

Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.分析:用m

2015-06-09 15:28:46 1130

原创 Leetcode[169]-Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element always

2015-06-09 14:06:28 1138

原创 Leetcode[88]-Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional

2015-06-09 13:13:13 986

visio_2010_64位.part3.rar

visio 2010官方版具备数据驱动的动态可视化工具和模板、强大的流程管理功能以及先进的 Web 共享功能,将图表绘制提升至全新的高度。visio 2010官方版在一个功能强大的图表中,引进多个源中大型图片的实时数据,并与生动的图形结合在一起。

2018-04-29

visio 2010 64 bit-part2

visio 2010官方版具备数据驱动的动态可视化工具和模板、强大的流程管理功能以及先进的 Web 共享功能,将图表绘制提升至全新的高度。visio 2010官方版在一个功能强大的图表中,引进多个源中大型图片的实时数据,并与生动的图形结合在一起。

2018-04-29

visio 2010 64 bit-part1

visio 2010官方版具备数据驱动的动态可视化工具和模板、强大的流程管理功能以及先进的 Web 共享功能,将图表绘制提升至全新的高度。visio 2010官方版在一个功能强大的图表中,引进多个源中大型图片的实时数据,并与生动的图形结合在一起。

2018-04-29

visio 2010 64 bit-part4

visio 2010官方版具备数据驱动的动态可视化工具和模板、强大的流程管理功能以及先进的 Web 共享功能,将图表绘制提升至全新的高度。visio 2010官方版在一个功能强大的图表中,引进多个源中大型图片的实时数据,并与生动的图形结合在一起。

2018-04-29

SSM框架jar包分享

SSMjar包,自身备份。

2017-07-31

决策树算法python实现

python实现决策树,具体步骤参考博文:http://blog.csdn.net/Dream_angel_Z/article/details/45965463

2015-05-25

python2.7.5安装及其相应的matplotlib的包及依赖

python2.7.5安装及其相应的matplotlib的包及依赖,详细步骤参考相应博文:http://blog.csdn.net/Dream_angel_Z/article/details/45966097

2015-05-25

python-2.7.5 Windows 32位软件

Windows32位的python 2.7.5

2015-05-25

jQuery+Struts+Ajax无刷新分页

使用myeclipse开发的jQuery加上struts的ajax无刷新分页,一个完整的demo,经测试,可运行。里面的数据是通过自己的拼凑的JSON数据来实现的分页。

2015-04-13

Ajax基本实例

一个基本的ajax实例!适合初学者接触ajax。

2015-04-12

Spring_0300_JDKProxy

简单的动态代理实现代码!文档参考博文Spring学习(3)AOP初步—JDK动态代理

2014-11-25

Struts_jQueryAjax

一个简单的在struts2中使用jQuery-ajax技术的demo.代码完整,jar包全部包含在里面!

2014-11-11

The Swift Programming Language - Apple Inc(英文版).pdf

PDF格式Swift学习指导,格式经过调试,非常的好! Swift is a new programming language for creating iOS and OS X apps. Swift builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much-loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how software development works. This book provides: - A tour of the language. - A detailed guide delving into each language feature. - A formal reference for the language.

2014-06-03

jasperreports-5.5.1_struts2.3整合用到的jar包

包含了jasperreports-5.5.1_struts2.3整合用到的jar包,制作报表的好东西,缺什么有什么。

2014-05-28

juit-4.11.jar jar包

junit的jar包,免费共享下,大家来下吧

2014-05-28

window7 64位 Oracle11g x64 安装plsql

解决win7 X64下安装plsql...方法使用,本人已测完毕!

2014-05-28

MySQL安装图解

安装图解及安装不成功的解决秘法,里面介绍的比较详细,新手可以下下来看看

2014-03-18

php-5.3.6-Win32-VC9-x64.zip

3、下载环境软件 将所有软件均下载存放于Server_Tools文件夹中,下载地址: mysql-essential-5.0.67-win32.msi http://dev.mysql.com/downloads/ php-5.2.8-Win32.zip http://php.net/downloads.php ZendOptimizer-3.3.3-Windows-i386.exe http://www.zend.com/en/products/guard/zend-optimizer PHPMyAdmin-3.1.0-all-languages.zip http://www.phpmyadmin.net/home_page/downloads.php

2014-03-18

经典-------C++程序开发范例宝典

Visual C++程序开发范例宝典 一、二章 源码

2011-11-15

mysql 教程学习

mysql学习教程。

2011-10-29

空空如也

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

TA关注的人

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