自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 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 = "aadbb

2014-10-18 22:40:55 335

原创 linux 常用命令

后台启动某项任务:nohup bin/server   &

2014-09-09 12:27:03 430

原创 python 模拟查询请求并处理返回结果

这是上周的任务了,今天总结下,Python

2014-09-09 11:26:48 2590

原创 关于Linux定时任务

之前一直不太了解爬取网页的真实过程,真的实现之后发现也

2014-09-05 20:33:39 655

原创 python 的MySQL操作

今天在Linux下操作MySQL,也是各种囧啊,首先记录下my

2014-09-03 09:52:54 326

原创 leetcode之3Sum

原题如下:

2014-06-11 15:15:28 467

原创 leetcode之Two Sum

原题如下:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the

2014-06-10 10:43:24 333

原创 leetcode之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 O(log (m+n)).这道题muqian

2014-06-10 09:56:03 526

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

2014-06-09 21:32:33 261

原创 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}, reo

2014-06-08 21:09:44 320

原创 leetcode之Sort List

原题如下:Sort a linked list in O(n log n) time using constant space complexity.leetcode上

2014-06-08 11:49:57 319

原创 leetcode之Reverse Words in a String

原题如下:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".这道题的题意很明确,首先想到的是将字符串按空格分割

2014-06-07 22:49:49 333

原创 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].关键还是思路,当理解了

2014-06-07 21:46:26 337

原创 leetcode之Word Break

原题如下:Given 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 = "leetcode",dic

2014-06-03 22:28:24 373

原创 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-06-03 19:23:52 371

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

2014-06-03 09:40:03 366

原创 leetcode之Maximal Rectangle

原题如下:Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.此题s

2014-06-02 17:08:40 485

原创 leetcode之Largest Rectangle in Histogram

原题如下: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 in the histogram.Above is a histogram wh

2014-05-30 11:41:55 576

原创 leetcode之Roman to Integer && Integer to Roman

Roman to Integer 的原题如下:

2014-05-28 20:44:32 500

原创 leetcode之Clone Graph

原题如下:Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separ

2014-05-28 17:09:24 536

原创 leetcode之Sqrt(x)

原题如下:Implement int sqrt(int x).Compute and return the square root of x.普通遍历方法kendi

2014-05-27 16:33:40 336

原创 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 14:53:14 338

原创 leetcode之First Missing Positive

原题如下:Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and us

2014-05-26 21:05:51 359

原创 leetcode之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-05-25 22:55:42 381

原创 leetcode之Valid Palindrome

原题如下:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car

2014-05-23 15:36:01 283

原创 leetcode之Best Time to Buy and Sell Stock && II && III

Best Time to Buy and Sell Stock的原题如下:

2014-05-22 23:11:01 401

原创 leetcode之Copy List with Random Pointer

原题如下:A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.

2014-05-22 15:54:10 327

原创 leetcode之 Longest Substring Without Repeating Characters

这道题的暴力解法比较简单,

2014-05-21 22:53:23 413

原创 leetcode之Add Two Numbers

原题如下:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i

2014-05-20 22:59:25 254

原创 leetcode之Recover Binary Search Tree

原题如下:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is pretty straight forward. Coul

2014-05-20 21:24:47 374

原创 leetcode之Anagrams

原题如下:Given an array of strings, return all groups of strings that are anagrams.不得不说,这道题的题意太模糊了,

2014-05-20 17:01:04 418

原创 leetcode之ZigZag Conversion

原题如下:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H N

2014-05-20 15:56:03 333

原创 leetcode之Merge k Sorted Lists

原题如下:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路一:按照归并排序的思路

2014-05-19 21:34:31 303

原创 leetcode之Distinct Subsequences

原题如下:Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some

2014-05-19 16:45:44 352

原创 leetcode之Jump Game && Jump Game II

Jump Game的原题如下:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that pos

2014-05-19 16:29:54 341

原创 leetcode之Gas Station

There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to

2014-05-16 11:27:32 323

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

2014-05-14 20:51:07 220

原创 leetcode之Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:

2014-05-14 16:14:12 208

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

2014-05-12 19:54:03 246

原创 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], a

2014-05-08 21:32:53 343

空空如也

空空如也

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

TA关注的人

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