自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(91)
  • 资源 (1)
  • 收藏
  • 关注

原创 [leetcode] 16. 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 integ

2015-12-31 16:11:35 505

原创 [leetcode] 15. 3Sum 解题报告

题目链接:https://leetcode.com/problems/3sum/Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of ze

2015-12-31 15:20:31 616

原创 [leetcode] 75. Sort Colors 解题报告

题目链接:https://leetcode.com/problems/sort-colors/Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order re

2015-12-30 17:30:15 638

原创 [leetcode] 209. Minimum Size Subarray Sum 解题报告

题目链接:https://leetcode.com/problems/minimum-size-subarray-sum/Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there

2015-12-30 14:41:39 1414

原创 [leetcode] 216. Combination Sum III 解题报告

题目链接:https://leetcode.com/problems/combination-sum-iii/Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combinati

2015-12-30 06:57:22 832

原创 [leetcode] 136. Single Number 解题报告

题目链接:https://leetcode.com/problems/single-number/Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runti

2015-12-30 02:51:24 500

原创 [leetcode] 292. Nim Game 解题报告

题目链接:https://leetcode.com/problems/nim-game/You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston

2015-12-29 17:29:37 696 1

原创 [leetcode] 8. String to Integer (atoi) 解题报告

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

2015-12-29 17:19:22 523

原创 [leetcode] 165. Compare Version Numbers 解题报告

题目链接:https://leetcode.com/problems/compare-version-numbers/Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0

2015-12-29 15:55:01 381

原创 [leetcode] 36. 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 are fil

2015-12-29 15:05:42 899

原创 [leetcode] 13. 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.思路:罗马数字总共有七个  即I(1)、V(5)、X(1

2015-12-29 14:08:01 539

原创 [leetcode] 232. Implement Queue using Stacks 解题报告

题目链接:https://leetcode.com/problems/implement-queue-using-stacks/Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the

2015-12-29 12:25:42 502

原创 [leetcode] 6. ZigZag Conversion 解题报告

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

2015-12-28 17:56:31 1071

原创 [leetcode] 225. Implement Stack using Queues 解题报告

题目链接:https://leetcode.com/problems/implement-stack-using-queues/Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element o

2015-12-28 17:20:11 509

原创 [leetcode] 28. Implement strStr() 解题报告

题目链接:https://leetcode.com/problems/implement-strstr/Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.思路:很简单的一题,

2015-12-28 16:32:40 1118

原创 [leetcode] 278. First Bad Version 解题报告

题目链接:https://leetcode.com/problems/first-bad-version/You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the

2015-12-28 16:19:27 775

原创 [leetcode] 160. Intersection of Two Linked Lists 解题报告

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

2015-12-28 15:20:22 534

原创 [leetcode] 223. 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 right co

2015-12-28 15:02:48 498

原创 [leetcode] 21. 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 first two lis

2015-12-28 14:00:54 411

原创 [leetcode] 299. 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 is. E

2015-12-28 11:05:25 592

原创 [leetcode] 155. Min Stack 解题报告

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

2015-12-28 10:35:17 471

原创 [leetcode] 19. Remove Nth Node From End of List 解题报告

题目链接:https://leetcode.com/problems/remove-nth-node-from-end-of-list/Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2

2015-12-28 09:58:15 387

原创 [leetcode] 168. Excel Sheet Column Title 解题报告

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

2015-12-27 17:46:03 454

原创 [leetcode] 67. 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".思路:刚开始的思路反转字符串,然后再进行运算,不过代码太

2015-12-27 17:15:30 611

原创 [leetcode] 58. Length of Last Word 解题报告

题目连接:https://leetcode.com/problems/length-of-last-word/Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.

2015-12-27 16:26:37 401

原创 [leetcode] 83. 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->2, r

2015-12-27 16:10:19 406

原创 [leetcode] 171. 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 column num

2015-12-27 15:52:30 441

原创 [leetcode] 237. 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 the linke

2015-12-27 15:14:32 439

原创 [leetcode] 258. 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 proces

2015-12-27 15:00:27 491

原创 [leetcode] 88. Merge Sorted Array 解题报告

题目链接:https://leetcode.com/problems/merge-sorted-array/Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough

2015-12-27 14:05:15 453

原创 [leetcode] 228. Summary Ranges 解题报告

题目链接:https://leetcode.com/problems/summary-ranges/Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return ["0->2","4->5","7

2015-12-27 13:30:50 393

原创 [leetcode] 26. Remove Duplicates from Sorted Array 解题报告

题目链接:https://leetcode.com/problems/remove-duplicates-from-sorted-array/Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.

2015-12-27 11:35:12 396

原创 [leetcode] 27. Remove Element 解题报告

题目链接:https://leetcode.com/problems/remove-element/Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It d

2015-12-27 11:25:44 410

原创 [leetcode] 66. Plus One 解题报告

题目链接:https://leetcode.com/problems/plus-one/Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit i

2015-12-27 11:13:53 583

原创 [leetcode] 290. 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 betwee

2015-12-27 07:05:32 758

原创 [leetcode] 301. 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

2015-12-26 16:00:49 9138

原创 [leetcode] 129. Sum Root to Leaf Numbers 解题报告

题目链接:https://leetcode.com/problems/sum-root-to-leaf-numbers/Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-l

2015-12-26 10:45:01 448

原创 [leetcode] 98. Validate Binary Search Tree 解题报告

题目链接:https://leetcode.com/problems/validate-binary-search-tree/Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre

2015-12-26 10:29:28 648

原创 [leetcode] 1. Two Sum 解题报告

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

2015-12-26 09:45:24 535

原创 [leetcode] 113. Path Sum II 解题报告

题目链接:https://leetcode.com/problems/path-sum-ii/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 below binary tree a

2015-12-25 04:43:44 467

qt3扫雷代码

本程序制作精心,代码完整,为10*10大小的雷区,等级分为三级,简单,中等,困难。其中布雷使用随机数生成,扫空格使用广度搜索BFS,基本具备了扫雷的应有的功能。界面友善,希望能对你有帮助。

2013-11-15

空空如也

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

TA关注的人

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