自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

shawjan的专栏

人生之快事在于尽吾之欢,足以!

  • 博客(34)
  • 资源 (8)
  • 收藏
  • 关注

原创 [leetcode]41 Climbing Stairs

题目链接:https://leetcode.com/problems/climbing-stairs/ Runtimes:2ms1、问题You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinc

2015-03-31 10:59:54 445

原创 [leetcode]40 Remove Nth Node From End of List

题目链接:https://leetcode.com/problems/remove-nth-node-from-end-of-list/ Runtimes:11ms1、问题Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list

2015-03-31 10:44:06 439

原创 [leetcode]39 Valid Parentheses

题目链接:https://leetcode.com/problems/valid-parentheses/ Runtimes:3ms1、问题Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets

2015-03-31 10:39:23 383

原创 [leetcode]38 Longest Common Prefix

题目链接:https://leetcode.com/problems/longest-common-prefix/ Runtimes:8ms1、问题Write a function to find the longest common prefix string amongst an array of strings.2、分析简单的题目,查找字符串集合中最长前缀。3、小结string函数中subs

2015-03-31 10:09:28 411

原创 [leetcode]37 Roman to Integer

题目链接:https://leetcode.com/problems/roman-to-integer/ Runtimes:57ms1、问题Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.2、分析简单的模式匹配过程,数字参考了这篇文

2015-03-31 09:41:33 392

原创 [leetcode]36 ZigZag Conversion

题目链接:https://leetcode.com/problems/zigzag-conversion/ Runtimes:40ms1、问题The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pat

2015-03-30 22:34:31 366

原创 [leetcode]35 Reverse Integer

文章链接:https://leetcode.com/problems/reverse-integer/ Runtimes:14ms1、问题Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here

2015-03-30 21:46:30 413

原创 [leetcode]34 String to Integer (atoi)

题目链接:https://leetcode.com/problems/string-to-integer-atoi/ Runtimes:15ms1、问题Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challen

2015-03-30 21:32:00 432

原创 [leetcode]33 Palindrome Number

题目链接:https://leetcode.com/problems/palindrome-number/ Runtimes:131ms1、问题Determine whether an integer is a palindrome. Do this without extra space.2、分析删除回文,传统思路是按照顺序将数字存入数组,然后进行字符串回文检查。但是问题要求不要有额外空间,想了

2015-03-30 15:21:00 435

原创 [leetcode]32 Length of Last Word

题目链接:https://leetcode.com/problems/length-of-last-word/ Runtimes:4ms1、问题Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the st

2015-03-28 16:18:50 390

原创 [leetcode]31 Symmetric Tree

题目链接:https://leetcode.com/problems/symmetric-tree/ Runtimes:8ms1、问题Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmet

2015-03-28 15:36:53 388

原创 [leetcode]30 Remove Duplicates from Sorted List

题目链接: Runtimes:1、问题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. 2、分析

2015-03-28 15:13:35 415

原创 [leetcode]29 Merge Sorted Array

题目链接:https://leetcode.com/problems/merge-sorted-array/ Runtimes:7ms1、问题Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (s

2015-03-28 15:06:30 366

原创 [leetcode]28 Same Tree

题目链接:https://leetcode.com/problems/same-tree/ Runtimes:3ms1、问题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

2015-03-28 11:52:25 386

原创 [leetcode]27 Reverse Bits

题目链接:https://leetcode.com/problems/reverse-bits/ Runtimes:10ms1、问题Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 0000001010010100

2015-03-28 10:20:04 524

原创 2014 华为模拟考题目

1、首尾字符不变,中间字符降序排列(字符串长度为7) input :CEAedca output:CedcEAa 时间空间都没要求。 void solution1() { char str[8]; cin >> str; for (int i = 1; i < 6; i++) { bool isChange = false;

2015-03-27 11:23:30 731

原创 编译原理 总结

一、 编译程序1、 编译器是一种翻译程序,它用于将源语言(即用某种程序设计语言写成的)程序翻译为目标语言(即用二进制数表示的伪机器代码写成的)程序。后者在windows操作系统平台下,其文件的扩展名通常为.obj。该文件通常还要经过进一步的连接,生成可执行文件(机器代码写成的程序,文件扩展名为.exe)。通常有两种方式进行这种翻译,一种是编译,另一种是解释。后者并不生成可执行文件,只是翻译一条语句

2015-03-26 17:36:07 34216 1

原创 数据结构 总结

1、常见的时间复杂度 O(1) < O(logn) < O (n) < O(n^2) < O(n^3) < O(2^n) < O(n!) < O(n^n) 2、循环队列队列满的条件 (rear + 1) % size == front 队列长度计算公式 (rear - front + size) % size 3、两栈共享空间栈满计算公式 top1 + 1 == top2 4、串模

2015-03-26 16:43:09 688

原创 [leetcode]26 Minimum Depth of Binary Tree

题目链接:https://leetcode.com/problems/minimum-depth-of-binary-tree/ Runtimes:16ms1、问题Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from th

2015-03-11 14:17:38 445

原创 [leetcode]25 Number of 1 Bits

题目链接:https://leetcode.com/problems/number-of-1-bits/ Runtimes:10ms1、问题Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight). For

2015-03-11 13:55:27 509

原创 [leetcode]24 Path Sum II

题目链接:https://leetcode.com/problems/path-sum-ii/ Runtimes:93ms 1、问题 Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. For example: Given the be

2015-03-11 13:45:32 390

原创 [leetcode]23 Path Sum

题目链接:https://leetcode.com/problems/path-sum/ Runtimes:201、问题Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the gi

2015-03-11 12:16:57 533

原创 [leetcode]22 Binary Tree Level Order Traversal

题目链接:https://leetcode.com/problems/binary-tree-level-order-traversal/ Runtimes:9ms1、问题Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by leve

2015-03-10 16:46:25 371

原创 [leetcode]21 Maximum Depth of Binary Tree

题目链接:https://leetcode.com/problems/maximum-depth-of-binary-tree/ Runtimes:16ms1、问题Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the

2015-03-10 16:17:04 465

原创 [leetcode]20 Pascals Triangle I

题目链接:https://leetcode.com/problems/pascals-triangle/ Runtimes:3ms1、问题Given numRows, generate the first numRows of Pascal’s triangle.For example, given numRows = 5, Return [ [1], [1,1

2015-03-10 11:13:32 596

原创 [leetcode]19 Pascal's Triangle II

题目链接:https://leetcode.com/problems/pascals-triangle-ii/ Runtimes:3ms1、问题Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you

2015-03-10 10:56:39 485

原创 [leetcode]18 Min Stack

题目链接:https://leetcode.com/problems/min-stack/ Runtimes:71ms1、问题Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) – Push element x onto stack.

2015-03-09 17:22:35 349

原创 [leetcode]17 Intersection of Two Linked Lists

题目链接:https://oj.leetcode.com/problems/intersection-of-two-linked-lists/ Runtimes:81ms1、问题Write a program to find the node at which the intersection of two singly linked lists begins. For example, the

2015-03-08 11:35:09 379

原创 [leetcode]16 Valid Palindrome

题目连接:https://oj.leetcode.com/problems/valid-palindrome/ Runtimes:16ms1、问题Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, “

2015-03-07 09:38:23 468

原创 [leetcode]15 Compare Version Numbers

题目链接:https://oj.leetcode.com/problems/compare-version-numbers/ Runtimes:2ms1、问题ompare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < version2 return -1, oth

2015-03-06 20:41:03 345

原创 [leetcode]14 Excel Sheet Column Title

题目连接:https://oj.leetcode.com/problems/excel-sheet-column-title/ Runtimes:1ms1、问题Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A

2015-03-06 16:53:06 458

原创 [leetcode]13 Majority Element

题目链接:https://oj.leetcode.com/problems/majority-element/ Runtimes:48ms1、问题Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.

2015-03-06 15:24:13 424

原创 [leetcode]12 Excel Sheet Column Number

题目链接:https://oj.leetcode.com/problems/excel-sheet-column-number/ Runtimes:16ms1、问题Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its correspondi

2015-03-05 15:56:24 457

原创 [Leetcode]11 Rotate Array

Rotate Array题目连接:https://oj.leetcode.com/problems/rotate-array/ Runtimes:26ms1、问题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

2015-03-05 12:00:24 534

TCP/IP详解·卷2:实现

《TCP/IP详解·卷2:实现》完整而详细地介绍了TCP/IP协议是如何实现的。书中给出了约500个图例,15000行实际操作的C代码,采用举例教学的方法帮助你掌握TCP/IP实现。《TCP/IP详解·卷2:实现》不仅说明了插口API和协议族的关系以及主机实现与路由器实现的差别。还介绍了4.4BSD-Lite版的新的特点。《TCP/IP详解·卷2:实现》适用于希望理解TCP/IP协议如何实现的人,包括编写网络应用程序的程序员以及利用TCP/IP维护计算机网络的系统管理员。

2015-10-30

深度探索C++对象模型

这本书探索“对象导向程序所支持的C++对象模型”下的程序行为。对于“对象导向性质之基础实现技术”以及“各种性质背后的隐含利益交换”提供一个清楚的认识。检验由程序变形所带来的效率冲击。提供丰富的程序范例、图片,以及对象导向观念和底层对象模型之间的效率测量。

2015-10-30

The Science Of Programming

Describes basic programming principles and their step-by- step applications.Numerous examples are included. 做到可以证明自己的程序的正确性(前条件+后条件+不变式)

2015-10-30

深入理解计算机系统

本书的最大优点是为程序员描述计算机系统的实现细节,帮助其在大脑中构造一个层次型的计算机系统,从最底层的数据在内存中的表示到流水线指令的构成,到虚拟存储器,到编译系统,到动态加载库,到最后的用户态应用。通过掌握程序是如何映射到系统上,以及程序是如何执行的,读者能够更好地理解程序的行为为什么是这样的,以及效率低下是如何造成的。 本书适合那些想要写出更快、更可靠程序的程序员阅读,也适合作为高等院校计算机及相关专业本科生、研究生的教材。

2015-10-30

SQL 练习题 样例

SQL 练习题 样例 请配合SQLFiddle一起练习,使用方法很简单,登陆sqlfiddle.com,把文本黏贴到左框,build schema,在右框写SQL语句,Run SQL,即可在框下方看到结果。

2015-10-05

[计算机网络第五版]计算机网络第五版 谢希仁

[计算机网络第五版]计算机网络第五版 谢希仁

2015-10-04

数据库系统概论(第四版)王珊等 扫描版

数据库系统概论(第四版) 王珊等 扫描版 自从1999年起,我们以教材为核心,全面建设《数据库系统概论》课程,我们承担了在教育部“远程教育环境下嵌入式数据库及其在教材重构中的应用”科学技术研究重点项目(1999-2000);基于Internet的《数据库系统概论》多媒体网络教学软件,中国人民大学本科教学改革项目;“数据库系统概论立体化精品课程教材建设”,高等教育百门精品课程教材建设计划,出版了由王珊、朱青编写的《数据库系统概论学习指导与习题解答》(高等教育出版社出版)和数据库教学光盘。

2015-10-04

空空如也

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

TA关注的人

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