自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 HTTP Header 详解

HTTP(HyperTextTransferProtocol)即超文本传输协议,目前网页传输的的通用协议。HTTP协议采用了请求/响应模型,浏览器或其他客户端发出请求,服务器给与响应。就整个网络资源传输而言,包括message-header和message-body两部分。首先传递message- header,即http header消息 。http header 消息通常被分为4个部分:g

2017-12-13 15:22:09 474

原创 LeetCode212. Word Search II

>Given a 2D board and a list of words from the dictionary, find all words in the board.>Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally

2017-12-12 19:08:07 407

原创 LeetCode211. Add and Search Word - Data structure design

>Design a data structure that supports the following two operations:>```void addWord(word)bool search(word)>```>search(word) can search a literal word or a regular expression string containing only letters

2017-12-12 16:49:49 341

原创 LeetCode 210 Course Schedule II

There are a total of n courses you have to take, labeled from 0 to n - 1.>Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: `[0,1

2017-12-12 16:43:39 299

原创 LeetCode208 Implement Trie (Prefix Tree)

LeetCode208 Implement Trie (Prefix Tree)问题描述 Implement a trie with insert, search, and startsWith methods. 问题分析问题描述很简单,就是写一个Trie树。至于Trie树是干什么的。前段时间刚好在做文本分词的时候研究过。大家可以去网上看一下。Wiki6天通吃树结构—— 第五天 Trie树

2017-12-11 21:28:13 257

原创 LeetCode207 Course Schedule

LeetCode207 Course Schedule问题描述 here are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have to first take co

2017-12-11 20:40:05 246

原创 LeetCode201. Bitwise AND of Numbers Range

LeetCode201. Bitwise AND of Numbers Range 问题来源LeetCode201. Bitwise AND of Numbers Range问题描述 Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this rang

2017-12-11 15:35:58 320

原创 LeeCode Contest 62 Find Smallest Letter Greater Than Target

Weekly Contest 62 Find Smallest Letter Greater Than Target问题描述 Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element

2017-12-10 23:32:12 255

原创 LeetCode 164. Maximum Gap

LeetCode 164. Maximum Gap 问题来源LeetCode 164. Maximum Gap问题描述 Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear

2017-12-07 18:45:37 393

原创 LeetCode 165. Compare Version Numbers

LeetCode 165. Compare Version Numbers 问题来源LeetCode 165. Compare Version Numbers问题描述 Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < version2 re

2017-12-07 18:32:56 253

原创 LeetCode 166. Fraction to Recurring Decimal

LeetCode 166. Fraction to Recurring Decimal 问题来源LeetCode 166. Fraction to Recurring Decimal问题描述 Given two integers representing the numerator and denominator of a fraction, return the fraction in

2017-12-06 21:48:28 217

原创 LeetCode 167. Two Sum II - Input array is sorted

LeetCode 167. Two Sum II - Input array is sorted 问题来源LeetCode 167. Two Sum II - Input array is sorted问题描述 Given an array of integers that is already sorted in ascending order, find two numbers suc

2017-12-06 21:37:18 221

原创 LeetCode 168. Excel Sheet Column Title

LeetCode 168. Excel Sheet Column Title 问题来源LeetCode 168. Excel Sheet Column Title问题分析 Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example:

2017-12-06 21:28:16 211

转载 Java面试题,转载

基本概念操作系统中 heap 和 stack 的区别 什么是基于注解的切面实现 什么是 对象/关系 映射集成模块 什么是 Java 的反射机制 什么是 ACID BS与CS的联系与区别 Cookie 和 Session的区别 fail-fast 与 fail-safe 机制有什么区别 get 和 post请求的区别 Interface 与 abstract 类的区别 IOC的优点

2017-12-06 21:25:24 188

原创 LeetCode 169. Majority Element

LeetCode 169. Majority Element 问题来源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.

2017-12-06 21:20:40 224

原创 LeetCode 171. Excel Sheet Column Number

LeetCode 171. Excel Sheet Column Number 问题来源LeetCode 171. Excel Sheet Column Number问题描述 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return i

2017-12-06 21:11:35 256

原创 LeetCode 172. Factorial Trailing Zeroes

LeetCode 172. Factorial Trailing Zeroes 问题来源LeetCode 172. Factorial Trailing Zeroes问题描述 Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logari

2017-12-06 21:08:30 232

原创 LeetCode 173. Binary Search Tree Iterator

LeetCode 173. Binary Search Tree Iterator 问题来源LeetCode 173. Binary Search Tree Iterator问题描述 Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root n

2017-12-06 20:56:52 274

原创 LeetCode174. Dungeon Game

LeetCode174. Dungeon Game 问题来源LeetCode174 Dungeon Game问题描述 The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms

2017-12-06 20:30:36 259

原创 LeetCode 187. Repeated DNA Sequences

LeetCode 187. Repeated DNA Sequences 问题来源LeetCode187 Repeated DNA Sequences问题描述 All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studyi

2017-12-06 20:20:27 345

原创 LeetCode Best Time to Buy and Sell Stock I & II & III & IV

LeetCode Best Time to Buy and Sell Stock 问题来源 LeetCode 121. Best Time to Buy and Sell Stock LeetCode 122. Best Time to Buy and Sell Stock II LeetCode 123. Best Time to Buy and Sell Stock II

2017-12-03 23:40:24 314

原创 LeetCode 189 Rotate Array

LeetCode189 Rotate Array 问题来源LeetCode189 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,

2017-12-03 21:11:39 167

原创 LeetCode 190 Reverse Bits

LeetCode 190 Reverse Bits 问题来源LeetCode190 Reverse Bits问题描述 Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 0000001010010100000111

2017-12-03 10:04:37 164

原创 LeetCode191 Number of 1 Bits

LeetCode191 Number of 1 Bits 问题来源LeetCode191 Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight). For example, the 3

2017-12-03 09:59:33 169

原创 LeetCode198 House Robber

LeetCode198 House Robber 问题来源LeetCode198问题描述 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you

2017-11-26 22:53:21 200

原创 LeetCode199 Binary Tree Right Side View

LeetCode199 Binary Tree Right Side View 问题来源LeetCode199问题描述 Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to b

2017-11-26 22:26:48 218

原创 LeetCode200 Number of Islands

LeetCode200 Number of Islands 问题来源 LeetCode200问题描述 Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting ad

2017-11-26 22:01:15 143

原创 LeetCode94 Binary Tree Inorder Traversal

LeetCode94 Binary Tree Inorder Traversal问题来源LeetCode94问题描述 Given a binary tree, return the inorder traversal of its nodes’ values. For example: Given binary tree [1,null,2,3], 1 \

2017-11-22 21:08:10 155

原创 LeetCode93 Restore IP Addresses

LeetCode93 Restore IP Addresses 问题来源leetcode93问题描述Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given “25525511135”,return [

2017-10-24 23:07:58 185

原创 LeetCode92 Reverse Linked List II

LeetCode92 Reverse Linked List II 问题来源LeetCode92问题描述 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,

2017-10-16 22:24:51 152

原创 LeetCode91 Decode Ways

LeetCode91 Decode Ways 问题来源LeetCode91问题描述 A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26 Given an encoded message

2017-10-16 22:16:52 218

原创 LeetCode70 Climbing Stairs

LeetCode70 Climbing Stairs问题描述 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 distinct ways can you climb to the to

2017-10-15 22:56:22 145

原创 LeetCode90 Subsets II

LeetCode90 Subsets II 问题来源LeetCode90问题描述 Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate sub

2017-10-15 22:50:15 164

原创 LeetCode89 Gray Code

LeetCode89 Gray Code 问题来源LeetCode89问题描述 Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.

2017-10-15 22:44:06 195

原创 LeetCode88 Merge Sorted Array

LeetCode88 Merge Sorted Array 问题来源LeetCode88问题描述 Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has enough spa

2017-10-15 22:38:21 152

原创 LeetCode87 Scramble String

LeetCode87 Scramble String问题来源LeetCode87问题描述 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 representat

2017-10-15 22:33:07 287

原创 LeetCode82 Remove Duplicates from Sorted List II

LeetCode82 Remove Duplicates from Sorted List II问题来源LeetCode82问题描述Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For exam

2017-10-15 21:54:53 328

原创 LeetCode86 Partition List

LeetCode86 Partition List问题来源LeetCode86问题描述 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

2017-10-15 21:48:00 186

原创 LeetCode85 Maximal Rectangle

LeetCode85 Maximal Rectangle问题来源 LeetCode85问题描述 Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area. For example, given the follo

2017-10-15 21:40:19 212

原创 LeetCode84 Largest Rectangle in Histogram

LeetCode84 Largest Rectangle in Histogram问题链接 LeetCode84问题描述 Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle

2017-10-15 21:29:50 212

空空如也

空空如也

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

TA关注的人

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