自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 栈增长方向与大端/小端问题

转载地址:http://www.cnblogs.com/xkfz007/archive/2012/06/22/2558935.html

2014-08-20 20:28:02 546

转载 浅谈C/C++的浮点数在内存中的存储方式

原文地址:                                                            C/C++浮点数在内存中的存储方式        任何数据在内存中都是以二进制的形式存储的,例如一个short型数据1156,其二进制表示形式为00000100 10000100。则在Intel CPU架构的系统中,存放方式为  10000100(低地址单元) 00

2014-08-19 16:35:33 463

转载 Linux下二进制文件的查看和编辑

http://blog.csdn.net/hansel/article/details/5097262

2014-07-10 20:04:53 555

转载 SSH不输入密码连接远程Linux主机

原文地址:http://blog.chinaunix.net/uid-25266990-id-2600515.html

2014-06-26 14:57:05 474

转载 升级Ubuntu 12.04下的gcc到4.7

原文地址:http://blog.chinaunix.net/uid-23381466-id-3475968.html

2014-06-26 10:03:32 336

原创 LeetCode Sudoku Solver

题目: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution.

2014-06-07 15:01:49 291

原创 LeetCode Next Permutation

题目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest

2014-06-07 10:55:14 305

原创 LeetCode Binary Tree Maximum Path Sum

题目: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / \ 2 3 Ret

2014-06-04 22:16:46 360

原创 LeetCode Trapping Rain Water

题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example,  Given [0,1,0,2,1,0,1,3

2014-06-04 20:49:14 330

原创 LeetCode Wildcard Matching

题目: Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching shoul

2014-06-04 16:52:15 337

原创 LeetCode Decode Ways

题目: 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 containing digits, determine the

2014-06-02 20:43:09 480

原创 LeetCode Valid Number

题目: Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note: It is intended for the problem statement to b

2014-06-02 17:27:42 494

原创 LeetCode Text Justification

题目: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a greedy approac

2014-06-02 11:54:29 413

原创 LeetCode Interleaving String

题目: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "dbbca", When s3 = "aadbbcbcac", return true. When s3 = "aadbbba

2014-06-01 15:43:43 424

原创 LeetCode Candy

题目: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at

2014-06-01 10:57:40 405

原创 LeetCode Substring with Concatenation of All Words

题目: You 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 concatenation of each word in L exactly once and w

2014-05-31 15:49:47 441

原创 LeetCode String to Integer (atoi)

题目: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible

2014-05-29 22:16:16 451

转载 LeetCode Regular Expression Matching

题目: Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire

2014-05-29 21:20:56 513

原创 LeetCode Reverse Nodes in k-Group

题目: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should remain

2014-05-29 17:15:30 440

原创 LeetCode Letter Combinations of a Phone Number

题目: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input

2014-05-29 12:07:26 450

原创 LeetCode Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 方法1:使用最小堆,

2014-05-28 21:40:01 450

转载 priority_queue用法(转载)

关于priority_queue 1,关于STL中的priority_queue:确定用top()查看顶部元素时,该元素是具有最高优先级的一个元素. 调用pop()删除之后,将促使下一个元素进入该位置.  2,如同stack和queue,priority_queue是一个基于基本序列容器进行构建的适配器,默认的序列器是vector.   模板原型: priority_queue

2014-05-28 21:21:10 518

原创 LeetCode Divide Two Integers

题目: Divide two integers without using multiplication, division and mod operator.

2014-05-28 18:02:34 453

原创 LeetCode Implement strStr()

题目: Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.

2014-05-28 16:20:26 432

原创 LeetCode Multiply Strings

题目: Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative.

2014-05-28 15:18:28 416

原创 LeetCode Combination Sum II

题目: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in th

2014-05-28 11:34:06 248

原创 LeetCode Combination Sum

题目: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlim

2014-05-28 10:17:52 322

原创 LeetCode Permutations II

题目: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], and

2014-05-27 22:20:01 280

原创 LeetCode Permutations

题目: Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. class

2014-05-27 21:38:04 278

原创 LeetCode Anagrams

题目: Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case.

2014-05-27 21:12:27 253

原创 LeetCode N-Queens II

题目: Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions.

2014-05-27 20:35:09 297

原创 LeetCode N-Queens

题目: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens

2014-05-27 20:27:47 298

原创 LeetCode Merge Intervals

题目: Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. /** * Definition for an interval. * struc

2014-05-27 17:39:17 234

原创 LeetCode Insert Interval

题目: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start ti

2014-05-27 16:38:20 289

原创 LeetCode Permutation Sequence

题目: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3): "123""132""21

2014-05-27 10:46:51 377

原创 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.

2014-05-27 09:38:49 224

原创 LeetCode Simplify Path

题目: Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" click to show corner cases. Corner Cases:

2014-05-26 22:13:04 255

原创 LeetCode Minimum Window Substring

题目: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = "ADOBECODEBANC" T = "ABC" Minimum windo

2014-05-26 20:58:19 295

原创 LeetCode Word Search

题目: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or v

2014-05-26 16:28:47 258

原创 LeetCode Search in Rotated Sorted Array II

题目: Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target

2014-05-24 17:03:12 248

空空如也

空空如也

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

TA关注的人

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