自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 资源 (15)
  • 问答 (1)
  • 收藏
  • 关注

原创 有关二叉树的部分操作

struct TreeNode{ ElemtType val; TreeNode *left,*right;}; 1.判定一棵二叉树是否是完全二叉树借助于层次遍历的算法,将所有结点入队列,包括空结点。出队遇到空结点时,查看其后是否有非空结点,若有,则不是完全二叉树。bool isComplete(TreeNode* root){ TreeNode* Q[Max

2015-03-28 22:13:12 682

原创 [LeetCode]Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.这道题是要求归并k个有序单链表。采用分治法,将任务分成两个子任务,然后递归求子任务,最后回溯:将k个list分成两半,然后继续划分,剩余连个list就合并。/** * Definition for si

2015-03-22 21:45:42 416

原创 [LeetCode]Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous subarray [4,

2015-03-22 20:24:12 460

原创 [LeetCode]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?这道题是要求在不额外使用存储空间的基础上判断一个单链表中是否存在一个环。环的存在,就是在无环的基础上,将最后一个结点的next不设为NULL,而是指向该结点前的任意

2015-03-22 18:55:49 583

原创 [LeetCode]Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这道题是给定一个有序的单链表,将它转换成一棵平衡的二叉搜索树。首先要知道平衡的二叉搜索树的特点: 1. 左子树上的所有结点的值小于根节点的值,右子树上所有结点的值大于根节点的值。即

2015-03-22 18:47:29 691

原创 [LeetCode]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:

2015-03-22 18:38:47 565

原创 [LeetCode]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 o

2015-03-22 18:30:20 585

原创 [LeetCode]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, return 1->2->5.

2015-03-22 18:06:44 652

原创 [LeetCode]Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 这道题是要求将单链表循环右移k次,每次

2015-03-20 22:23:50 541

原创 [LeetCode]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. 这道题是要求删除有

2015-03-20 22:10:05 597

原创 [LeetCode]Insertion Sort

Sort a linked list using insertion sort.这道题是要求用插入排序的方式对单链表进行排序。先不考虑边界情况: 1. 将第一个结点看做有序区,之后的所有结点看做无序区。 2. 从第二个结点p开始,遍历有序区,知道遇到比结点p值大的结点q,将结点p插入到结点q之前。 3. 重复上述步骤直到链表遍历结束。需要注意的是: 1. 遍历无序区时,需要保存当前结点的后

2015-03-20 22:04:28 560

原创 [LeetCode]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},

2015-03-17 21:49:06 509

原创 [LeetCode]Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: [“2

2015-03-17 20:59:51 659

原创 [LeetCode]Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place wit

2015-03-17 15:36:54 580

原创 [LeetCode]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-03-17 15:26:45 552

原创 [LeetCode]Sort List

Sort a linked list in O(n log n) time using constant space complexity.这道题是要求对单链表进行排序,有个O(nlogn)的时间复杂度的要求。我的想法是采取类似头插法的方式,遍历链表结点,设3个指针,min指向当前链表中的最小值,max指向当前链表中的最大值,cur指向前一插入的值。min , max , cur 初始时都指向第

2015-03-17 14:42:14 446

原创 MySQL修改密码与更改默认编码

修改密码管理员身份进入cmd,关闭Mysql服务 net stop mysql切换到mysql的bin目录,运行命令 mysqld –defaults-file=”C:\Program Files\MySQL\MySQL Server 5.6\my.ini” –console –skip-grant-tables打开新cmd窗口,启动Mysql服务 net start mysql

2015-03-17 14:26:14 590

原创 [LeetCode]Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has th

2015-03-13 23:06:46 624

原创 [LeetCode]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

2015-03-11 22:01:25 683

原创 [LeetCode]Reverse Bits

Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001

2015-03-10 12:00:10 1177

原创 [LeetCode]Rotate Array

Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Note: Try to come up as many solu

2015-03-10 11:49:14 602

数据库系统实现 课后答案 英文

Database System Implementation 数据库系统实现 斯坦福课程主页上整理下来的课后答案

2018-04-18

zookeeper-3.4.6

zookeeper-3.4.6

2016-03-20

commons-collections.jar

2016-03-19

jedis-2.6.0.jar

jedis jar 包,用于java编程

2016-03-19

程序员面试攻略(第2版)高清PDF

程序员面试攻略(第2版)高清PDF

2016-03-16

新手入门:Spring的一些学习方法及意见

新手入门:Spring的一些学习方法及意见

2016-03-08

SPRING技术内幕:深入解析SPRING架构与设计原理第2版

SPRING技术内幕:深入解析SPRING架构与设计原理(第2版).pdf

2016-03-08

C++编程规范-101条规则准则与最佳实现

C++编程规范-101条规则准则与最佳实现

2016-03-03

深度探索C++对象模型

深度探索C++对象模型PDF中文清晰版,资源共享。

2016-03-03

不同排序算法动态生成效果JQuery实现

用JQuery实现不同排序算法(冒泡、堆、快速、插入等)的动态生成效果,可以在同一个界面对比不同排序的效率。

2016-03-02

汉诺塔问题

转载的别人对于汉诺塔理解的一份PPT,讲解的很好,可以下载看看。

2015-10-12

Head First Servlets and JSP 2nd Edition.Mar.2008

Head First Servlets and JSP 2nd Edition.Mar.2008 英文原版

2014-07-21

《Servlet和JSP学习指南》源码

《Servlet和JSP学习指南》源码

2014-07-21

自定义FilterChain的编写

不使用Servlet Filter接口,自定义FilterChain处理多个Filter执行顺序问题

2014-07-16

Objective-C Programming- The Big Nerd Ranch Guide, 2 edition

Want to write applications for iOS or the Mac? This is the guide for you. Based on Big Nerd Ranch's legendary Objective-C Bootcamp, this book covers C, Objective-C, and the common programming idioms that will help you make the most of Apple technologies

2014-04-20

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

TA关注的人

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