自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(76)
  • 资源 (3)
  • 收藏
  • 关注

原创 【Leetcode】Sliding Window Maximum

题目链接:https://leetcode.com/problems/sliding-window-maximum/题目: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only s

2016-06-30 18:01:11 3165

转载 发邮件自动回复本机IP——python版本

【转载自】:http://blog.csdn.net/wds2006sdo/article/details/51258861这几天在写爬虫,有时候在宿舍需要远程登陆到实验室的主机上对代码进行一些微调,但是因为动态ip经常不知道实验室主机的IP是多少,因此产生了写这个小工具的想法。 工作原理描述: 首先需要一个专用的邮箱,该工具每隔2分钟查询有没有新邮件。当用户向该邮箱发送邮件查询ip时

2016-06-30 15:28:10 3130

原创 【Leetcode】Sum of Two Integers

题目链接:https://leetcode.com/problems/sum-of-two-integers/题目: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example: Given a = 1 and b = 2, return 3.思路:

2016-06-30 14:16:27 2460

原创 【Leetcode】Count Numbers with Unique Digits

题目链接:https://leetcode.com/problems/count-numbers-with-unique-digits/题目: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n.Example: Given n = 2, return 91. (Th

2016-06-29 10:52:49 915

原创 【Leetcode】Water and Jug Problem

题目链接:https://leetcode.com/problems/water-and-jug-problem/You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it i

2016-06-29 10:39:01 1221

原创 【Leetcode】valid perfect square

题目链接:https://leetcode.com/problems/valid-perfect-square/题目: Given a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in librar

2016-06-28 21:26:25 1438

原创 【Leetcode】Largest Divisible Subset

题目链接:https://leetcode.com/problems/largest-divisible-subset/题目: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: S

2016-06-28 10:18:03 4088

原创 【Leetcode】Design Twitter

题目链接:题目: Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the user’s news feed. Your design should suppo

2016-06-11 19:19:44 3442

原创 【Leetcode】Palindrome Partitioning II

题目链接:https://leetcode.com/problems/palindrome-partitioning-ii/题目: Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindro

2016-06-11 10:13:23 1676

原创 【Leetcode】Palindrome Partitioning

题目链接:https://leetcode.com/problems/palindrome-partitioning/题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partit

2016-06-11 00:22:44 2043

原创 【Leetcode】Pascal's Triangle II

题目链接:https://leetcode.com/problems/pascals-triangle-ii/题目: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 opt

2016-06-10 20:22:31 1874

原创 【Leetcode】Longest Consecutive Sequence

题目链接:https://leetcode.com/problems/longest-consecutive-sequence/题目:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100,

2016-06-10 20:21:47 1796

原创 【Leetcode】3Sum Closest

题目链接:https://leetcode.com/problems/3sum-closest/题目:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three

2016-06-10 20:21:15 1957

原创 【Leetcode】4Sum

题目链接:https://leetcode.com/problems/4sum/题目:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whi

2016-06-10 20:20:22 2057

原创 【Leetcode】Valid Sudoku

题目链接:https://leetcode.com/problems/valid-sudoku/题目:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells ar

2016-06-10 20:18:19 1924

原创 【Leetcode】Longest Valid Parentheses

题目链接:https://leetcode.com/problems/longest-valid-parentheses/题目: Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.For

2016-06-10 16:16:16 1837

原创 【Leetcode】Binary Tree Maximum Path Sum

题目链接:https://leetcode.com/problems/binary-tree-maximum-path-sum/题目: Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node

2016-06-10 01:06:37 1836

原创 【Leetcode】Bulls and Cows

题目链接:https://leetcode.com/problems/bulls-and-cows/题目:You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number

2016-06-09 21:14:00 2206

原创 【Leetcode】Valid Anagram

题目链接:https://leetcode.com/problems/valid-anagram/题目:Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true

2016-06-09 21:13:33 1964

原创 【Leetcode】Happy Number

题目链接:https://leetcode.com/problems/happy-number/题目:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any pos

2016-06-09 21:11:32 1801

原创 【Leetcode】Isomorphic Strings

题目链接:https://leetcode.com/problems/isomorphic-strings/题目:Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to ge

2016-06-09 21:07:13 1839

原创 【Leetcode】Word Pattern

题目链接:https://leetcode.com/problems/word-pattern/题目:Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection b

2016-06-09 21:06:08 1813

原创 【Leetcode】Remove Invalid Parentheses

题目链接:https://leetcode.com/problems/remove-invalid-parentheses/题目: Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.Note: The input

2016-06-09 18:59:41 1906

原创 【Leetcode】Max Points on a Line

题目链接:https://leetcode.com/problems/max-points-on-a-line/题目:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.思路:对所有可以配对的点计算他们之间的斜率,并保存。时间

2016-06-08 21:36:40 2099

原创 【Leetcode】Group Anagrams

题目链接:https://leetcode.com/problems/anagrams/题目:Given an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "

2016-06-08 21:34:04 2051

原创 【Leetcode】Add Digits

题目链接:https://leetcode.com/problems/add-digits/题目:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the p

2016-06-08 21:33:01 2017 1

原创 【Leetcode】Excel Sheet Column Number

题目链接:https://leetcode.com/problems/excel-sheet-column-number/题目:Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding colum

2016-06-08 21:32:08 1873

原创 【Leetcode】Excel Sheet Column Title

题目链接:点击打开链接题目:Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA

2016-06-08 21:31:21 1969

原创 【Leetcode】Roman to Integer

题目链接:https://leetcode.com/problems/roman-to-integer/题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.思路:easy算法:

2016-06-08 21:30:30 1834

原创 【Leetcode】Merge Two Sorted Lists

题目链接:https://leetcode.com/problems/merge-two-sorted-lists/题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the

2016-06-07 20:35:34 1497

原创 【Leetcode】Remove Duplicates from Sorted List

原题链接:https://leetcode.com/problems/remove-duplicates-from-sorted-list/题目:Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1-

2016-06-07 20:34:41 1373

原创 【Leetcode】Reverse Linked List

原题链接:https://leetcode.com/problems/reverse-linked-list/题目:Reverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?

2016-06-07 20:34:13 2411

原创 【Leetcode】Linked List Cycle

原题链接:https://leetcode.com/problems/linked-list-cycle/题目:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:两个指针,一个移动

2016-06-07 20:33:40 2385

原创 【Leetcode】Delete Node in a Linked List

原题链接:https://leetcode.com/problems/delete-node-in-a-linked-list/题目描述:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed th

2016-06-07 20:33:07 1413

原创 【Leetcode】Russian Doll Envelopes

题目链接:https://leetcode.com/problems/russian-doll-envelopes/题目:You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if a

2016-06-07 15:51:54 2531

原创 【Leetcode】Ugly Number

题目链接:https://leetcode.com/problems/ugly-number/题目:Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5

2016-06-06 20:39:38 1622

原创 【Leetcode】Palindrome Number

题目链接:https://leetcode.com/problems/palindrome-number/题目:Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie

2016-06-06 20:38:35 1518

原创 【Leetcode】Rectangle Area

题目链接:https://leetcode.com/problems/rectangle-area/题目:Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top rig

2016-06-06 20:38:01 1620

原创 【Leetcode】Add Binary

题目链接:https://leetcode.com/problems/add-binary/题目:Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".思路:easy算法:

2016-06-06 20:37:00 1610

原创 【Leetcode】Reverse Integer

题目链接:https://leetcode.com/problems/reverse-integer/题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321思路:注意正负情况算法:[java] vi

2016-06-06 20:35:27 1438

java 贴吧合影小程序

有源码和jar 前几天在新浪微博看见有人写了一个按贴吧用户排行来截取用户头像的一个小工具、应该是用c++写的、很感兴趣、于是花了一晚上写了一个类似的。感兴趣的同学可以完善一下代码、比如可以改成多线程、优化代码、我是把每个用户头像都下载到D盘、其实完全不用这样、你可以把Image对象存到list中、然后改一下相关代码就ok了、最近赶着期末复习、代码写的很烂、多多指教!

2012-12-26

五子棋单机版和网络版

java版五子棋 单机版和网络版!我是新手,多多指教!

2012-09-21

java 魔塔小游戏 源码和jar文件

java 小游戏 魔塔 用了两三天时间写的 ,多多指教!

2012-09-08

空空如也

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

TA关注的人

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