自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(64)
  • 收藏
  • 关注

原创 疯狂JAVA讲义

第一章:JAVA语言概述

2016-01-11 07:04:34 2698

原创 HeadFirst Java

第一章:基本概念1:

2016-01-07 23:44:56 530

原创 java基础

1:boolean作为单个数据结构存取数据占用4个字节,作为数组中的数据结构占用1个字节。2:java只能控制栈空间和堆空间

2015-12-28 01:18:44 372

原创 JavaScript DOM编程艺术

P11:JavaScript解释器对P17:数组中的元素可以是变量P23:使用==符号时,空字符串与false会返回true,要使用===P28:变量使用下划线分开,函数用驼峰法P29:与php不同,在函数内部可以直接使用全局变量,不需要加关键字globalP31:由浏览器提供的预定义对象被称为宿主对象PP:script最好放在之前,可以提高性能P51:如果对于链接,想

2015-07-28 18:14:26 420

原创 PHP相关

1:PHP 脚本以 结尾:注释:PHP 语句以分号结尾(;)。PHP 代码块的关闭标签也会自动表明分号(因此在 PHP 代码块的最后一行不必使用分号)。2:PHP注释:// 这是单行注释# 这也是单行注释/*这是多行注释块它横跨了多行*/?>3:在 PHP 中,所有用户定义的函数、类和关键词(例如 if、else、echo

2015-07-28 13:51:58 440

原创 jquery相关

1:2:提示:可以用 animate() 方法来操作所有 CSS 属性吗?是的,几乎可以!不过,需要记住一件重要的事情:当使用 animate() 时,必须使用 Camel 标记法书写所有的属性名,比如,必须使用 paddingLeft 而不是 padding-left,使用 marginRight 而不是 margin-right,等等。3:>默认情况下,所有 H

2015-07-27 00:07:22 289

原创 JavaScript相关

1:HTML 中的脚本必须位于 与 标签之间。脚本可被放置在 HTML 页面的 和 部分中。2:请使用 document.write() 仅仅向文档输出写内容。如果在文档已完成加载后执行 document.write,整个 HTML 页面将被覆盖:3:JavaScript 对大小写是敏感的。4:如果重新声明 JavaScript 变量,该变量的值不会丢失:5:Jav

2015-07-25 00:12:03 280

原创 CSS相关

1:一般而言,所有的样式会根据下面的规则层叠于一个新的虚拟样式表中,其中数字 4 拥有最高的优先权。1浏览器缺省设置2外部样式表3内部样式表(位于 标签内部)4内联样式(在 HTML 元素内部)2:请注意,当使用 RGB 百分比时,即使当值为 0 时也要写百分比符号。但是在其他的情况下就不需要这么做了。比如说,当尺寸为 0 像素时,0 之后不需要使用 px 单位,因为 0 就

2015-07-21 23:50:45 315

原创 HTML相关

1:使用可以保留文本的格式2:Here is some Hebrew text改变文本输出顺序,rtl:right to left。bdo:bi-directional override3:使用 blockquote 元素的话,浏览器会插入换行和外边距,而 q 元素不会有任何特殊的呈现4::定义斜体5::呈现类似打字机或者等宽的文本效果。6:ID和Name都可以用来标识一个

2015-07-20 10:12:20 336

原创 读书笔记《Effective C++》tt

条款01:视C++为一个语言联邦P12:对于内置类型而言,传值通常比传引用高效。当使用C++面向对象时,由于用户自定义的构造函数和析构函数的存在,pass by reference to const往往更好。P13:STL的迭代器和函数对象都是在C指针之上塑造出来的,所以对STL的迭代器和函数对象而言,旧式的C传值守着再次适用条款02:尽量以const,enum,inline替代#de

2015-07-02 23:01:50 390

原创 读书笔记《操作系统》

第一章 操作系统概述1.1 操作系统的基本概念1.1.1 操作系统的概念操作系统是指控制和管理整个计算机系统的硬件和软件资源,并合理组织和调度计算机的工作和资源分配,以提供给用户和其它软件方便的接口和环境的程序集合1.1.2 操作系统的特征P2 并发,共享,虚拟,异步。前两者为基本特征。1.1.3 操作系统的目标和功能P4 处理机管理,存储器

2015-06-01 06:58:55 890

原创 The Skyline Problem

题目:The Skyline ProblemA city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are given the locations and

2015-05-28 09:33:41 598

原创 读书笔记《TCP/IP详解卷一:协议》

第一章:概述1.1 引言1.2 分层P1:TCP/IP通常被认为是一个四层协议系统应用层Telnet、FTP、email等运输层TCP和UDP网络层IP、ICMP、IGMP链路层设备驱动程序以及接口卡P2:Telnet远程登录,FTP文件传输协议,SMTP简单邮件传送协议,SNMP简单网络管理协议

2015-05-07 14:51:42 2740

原创 面试笔试知识点积累

1:STL容器是线程不安全的2:stl::bitset不是STL容器3:std::stack默认是用deque实现

2015-05-06 14:37:28 730

原创 读书笔记《深入探索C++对象模式》

第一章:关于对象P6:C++的布局以及存取时间上主要的额外负担是由virtual引起的,包括virtual function机制以及virtual base class1.1 C++对象模式P6:2种数据成员类型:nonstatic和static,三种成员函数类型:static,nonstatic和virtualP7:简单对象模型:members按照声明顺序,各被指定一个slot,

2015-05-06 09:13:31 422

原创 读书笔记《Windows程序设计》

第一章:起步1.1 Windows环境P6:所有GUI都用位图视频显示器显示图形P7:一个操作系统如果没有内存管理就不能实现多任务P7:windows工作原理的中心思想就是动态链接的概念P8:3个主模块。1:内核:负责操作系统的那些传统工作,包括内存管理、文件输入/输出及任务管理等。2:用户:指的是用户界面,负责所有的窗口管理。3:GDI:就是图形设备接口,负责在屏幕或者打印机

2015-05-05 12:45:18 1042

原创 读书笔记《Head First设计模式》

第一章:欢迎来到设计模式世界P9:设计原则:找出应用中可能需要变化之处,把它们独立出来,不要和那些不需要变化的代码混在一起P11:设计原则:针对接口编程,而不是针对实现编程P23:设计原则:多用组合,少用继承P24:策略模式:定义了算法簇,分别封装起来,让他们之间可以互相替换,此模式让算法的变化独立于使用算法的客户P32:良好的OO设计必须具备可复用,可扩充,可维护三个特性

2015-05-03 19:20:42 670

原创 leetcode 复习(更新中)

1:题目:Median of Two Sorted Arrays 描述:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be

2015-03-15 16:38:38 434

转载 Best Time to Buy and Sell Stock IV

原文地址:http://www.cnblogs.com/grandyang/p/4295761.htmlSay 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 m

2015-03-11 16:20:24 429

转载 Repeated DNA Sequences

原文地址:http://blog.youkuaiyun.com/u013325815/article/details/43601367All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, i

2015-02-08 20:57:32 310

转载 Longest Palindromic Substring

原文地址:http://leetcode.com/2011/11/longest-palindromic-substring-part-ii.htmlGiven a string S, find the longest palindromic substring in S.Note:This is Part II of the article: Longest

2015-02-04 08:16:06 413

转载 Convert Sorted List to Binary Search Tree

原文地址:http://blog.youkuaiyun.com/salutlu/article/details/24502109Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.想了好久想不出来,后来看了题目分类里面说是DFS,但是没有

2015-01-30 17:14:06 352

转载 median of two sorted arrays

原文地址:http://blog.youkuaiyun.com/yutianzuijin/article/details/11499917/首先假设数组A和B的元素个数都大于k/2,我们比较A[k/2-1]和B[k/2-1]两个元素,这两个元素分别表示A的第k/2小的元素和B的第k/2小的元素。这两个元素比较共有三种情况:>、证明也很简单,可以采用反证法。假设A[k/2-1]大于合并之后的

2015-01-17 09:12:28 450

转载 Substring with Concatenation of All Words

原文地址:http://www.2cto.com/kf/201406/311648.htmlYou are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati

2015-01-14 22:35:00 284

转载 Word Ladder

原文地址:http://www.mysjtu.com/page/M0/S951/951547.htmlProblem Link:http://oj.leetcode.com/problems/word-ladder/Two typical techniques are inspected in this problem:Hash Table. O

2015-01-14 20:38:21 351

转载 Palindrome Partitioning II

原文地址:http://blog.youkuaiyun.com/doc_sgl/article/details/13418125Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindro

2015-01-13 22:17:26 271

转载 Merge k Sorted Lists

自己写的就是很普通的递归,每次分成2半,返回merge后的数组,时间复杂度为nlogk下面的方法时间复杂度一样,不过思路更好,虽然在leetcode上我自己的代码时间更短些,但是相差不多,下面用来拓展思路。简单说下:下面就是利用堆来做,其余的自己看代码原文地址:http://cozilla.iteye.com/blog/1851712/**  * Definitio

2014-12-24 21:06:26 301

转载 Maximal Rectangle

原文地址:http://blog.youkuaiyun.com/littlestream9527/article/details/19641013方法二的参考地址:http://hi.baidu.com/mzry1992/item/030f9740e0475ef7dc0f6cba隔了一个月又回来了。这题之前做过,思路就是根据上一题中求直方图中的最大矩形面积来求全部包含1的最大矩形面积,就是多加

2014-12-23 15:43:36 491

转载 Word Break

Problem DescriptionGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "lee

2014-12-22 22:22:04 313

转载 Largest Rectangle in Histogram

原文地址:http://blog.youkuaiyun.com/doc_sgl/article/details/11805519Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectang

2014-12-22 14:07:00 347

转载 sqrt(x)

原文地址:http://blog.youkuaiyun.com/doc_sgl/article/details/12404971Implement int sqrt(int x).Compute and return the square root of x.1. 二分法:这道题一看到函数的定义int sqrt(int x)都是int就高兴了,直接二分吧。但是要注意,即使用lo

2014-12-20 18:53:34 343

原创 Maximum Gap

题目:Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 e

2014-12-18 23:20:00 363

转载 Best Time to Buy and Sell Stock III

原文地址:http://www.cnblogs.com/lihaozy/archive/2012/12/19/2825525.html#include #include using namespace std;class Solution {public:/*解释:首先,因为能买2次(第一次的卖可以和第二次的买在同一时间),但第二次的买不能在第一次的卖左边。所以

2014-12-18 22:52:19 323

转载 First Missing Positive

原文地址:http://blog.163.com/ya_mzy/blog/static/199593255201361793545926/先上题目。 再谈思路。一个最简单的方法就是先排序,然后扫一遍找出第一个不连续的正数。大致的代码如下,没测试。int firstMissingPositive(int A[], int n){ sort

2014-12-17 16:02:36 274

转载 ZigZag Conversion

原文地址:http://www.cnblogs.com/sanghai/p/3632528.html自己的方法比较笨拙,是依此计算每个点在下面这个结构中的坐标,然后再输出,下面这个方法更加简洁。Zigzag:即循环对角线结构(0   8   16   1

2014-12-17 13:58:25 277

原创 Scramble String

题目:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great /

2014-12-16 23:31:22 310

转载 Anagrams

原文地址:http://www.cnblogs.com/easonliu/p/3643595.htmlGiven an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.这题先得知道啥叫Anagrams,知道后其实很简单。

2014-12-16 14:46:24 308

转载 Recover Binary Search

原文地址:http://blog.youkuaiyun.com/worldwindjp/article/details/21694179Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution

2014-12-16 14:45:09 231

转载 Permutations II

Permutations IIMar 17 '124943 / 12877Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique pe

2014-12-15 13:09:37 300

转载 Distinct Subsequences

原文地址:http://www.cnblogs.com/ganganloveu/p/3836519.htmlDistinct SubsequencesGiven a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is

2014-12-10 13:51:32 289

空空如也

空空如也

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

TA关注的人

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