- 博客(35)
- 收藏
- 关注
原创 LeetCodeOJ_3_m_Longest Substring Without Repeating Characters
答题链接题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3
2015-12-12 11:29:08
327
原创 LeetCodeOJ_11_m_Container With Most Water
答题链接题目:Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find
2015-12-08 17:45:49
382
原创 LeetCodeOJ_5_m_Longest Palindromic Substring(最长回文子串)
答题链接题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.Tags String Similar
2015-12-07 22:14:48
366
原创 LeetCodeOJ_125_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” i
2015-11-18 21:46:40
325
原创 LeetCodeOJ_7_Reverse Integer
答题链接题目:Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this? Here are some good questions to ask before coding. Bonus points for you
2015-11-18 21:37:46
343
原创 LeetCodeOJ_190_Reverse Bits
答题链接题目:Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111
2015-11-18 21:29:32
432
原创 LeetCodeOJ_242_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. s = “rat”, t = “car”, return false. Note: You may a
2015-11-13 10:58:55
492
原创 LeetCodeOJ_9_Palindrome Number
答题链接题目:Determine whether an integer is a palindrome. Do this without extra space. Tags Math Similar Problems (E)Palindrome Linked List分析:notes:不要忘记n为负的情况代码:class Solution {public: bool isPalind
2015-11-12 13:44:22
437
原创 LeetCodeOJ_234_Palindrome Linked List
答题链接题目:Given a singly linked list, determine if it is a palindrome(回文). Follow up: Could you do it in O(n) time and O(1) space?Tags: Linked List Two Pointers Similar: Problems (E)Palindrome Number,
2015-11-12 13:26:25
342
原创 LeetCodeOJ_223_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 corner as shown in the figure. Assume that the tota
2015-11-10 16:19:49
335
原创 LeetCodeOJ_217_Contains Duplicate
答题链接题目:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every elem
2015-11-10 16:14:13
380
原创 LeetCodeOJ_231_Power of Two
答题链接题目:Given an integer, write a function to determine if it is a power of two.Tags Math Bit Manipulation Similar Problems (E) Number of 1 Bits分析:无代码:class Solution {public: bool isPowerOfTwo(int
2015-11-10 16:01:48
296
原创 LeetCodeOJ_228_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”].Tags Array Similar Problems (M) Missing Ranges代码
2015-11-10 15:23:57
312
原创 linux下的git使用集锦
参考资料:1.廖雪峰的官方网站http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b0002.http://blog.163.com/023_dns/blog/static/1187273662013111301046930/
2015-10-29 11:12:04
433
转载 判断一个图是否有环(无向图、有向图)
原文地址:http://www.cnblogs.com/xwdreamer/archive/2011/06/11/2297008.html 1.
2015-10-26 16:05:03
1206
原创 LeetCodeOJ_208_Course Schedule
答题链接题目: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 a
2015-10-26 15:53:31
265
转载 机器学习之正则化(Regularization)
原地址:http://www.cnblogs.com/jianxinzhou/p/4083921.html?utm_source=tuicool&utm_medium=referral
2015-10-26 15:19:18
398
原创 LeetCodeOJ_206_Reverse Linked List
答题链接题目:Reverse a singly linked list. A linked list can be reversed either iteratively or recursively. Could you implement both?
2015-10-25 10:24:46
406
原创 STL之map
C++中map容器提供一个键值对容器,map与multimap差别仅仅在于multiple允许一个键对应多个值。 1. 头文件#include 2. 定义map3. 插入数据(1) my_Map[“a”] = 1; (2) my_Map.insert(map4. 查找数据map 5. 删除数据(1) my_Map.erase(my_Itr); (2) m
2015-10-24 14:13:18
323
原创 LeetCodeOJ_205_Submission Details
答题链接题目:Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with anothe
2015-10-24 13:50:58
314
原创 LeetCodeOJ_203_Remove Linked List Elements
答题链接题目:Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5代码:/** * Definition for singly-link
2015-10-04 00:21:41
266
原创 LeetCodeOJ_202_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 positive integer, replace the number by the sum of the squar
2015-10-03 22:12:05
336
原创 LeetCodeOJ_160_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 two linked lists: A: a1 → a2 ↘
2015-07-21 12:46:29
324
原创 LeetCodeOJ_168_Excel Sheet Column Title
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
2015-07-20 12:26:55
392
原创 LeetCodeOJ_171_Excel Sheet Column Number
Given a column title as appear in an Excel sheet, return its corresponding column number.
2015-07-17 16:00:46
377
原创 LeetCodeOJ_172_Factorial Trailing Zeroes
题目:Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity。
2015-07-16 00:34:53
284
原创 LeetCodeOJ_189_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,6,7,1,2,3,4]. Note:Try to come up as many solutions as you can, there are at least 3 different ways to solve this proble
2015-06-17 16:22:56
425
原创 LeetCodeOJ_191_Number of 1 Bits_e
For example, the 32-bit integer ’11' has binary representation 00000000000000000000000000001011, so the function should return 3.
2015-06-12 11:09:25
388
原创 LeetCodeOJ_198_House Robber_e
You are a professionalrobber planning to rob houses along a street. Each house has a certain amountof money stashed, the only constraint stopping you from robbing each of them isthat adjacent houses have security system connected and it will automaticallyc
2015-06-12 11:06:39
340
原创 LeetCodeOJ_199_Binary Tree Right Side View
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 bottom.
2015-06-12 10:55:01
478
原创 LeetCodeOJ_200_Number of Islands
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 adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
2015-06-08 23:46:43
369
原创 LeetCodeOJ_201_Bitwise AND of Numbers Range
Given a range [m, n]where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbersin this range, inclusive.For example, giventhe range [5, 7], you should return 4.
2015-06-07 15:48:30
399
转载 硬盘数据恢复 U盘数据恢复 移动硬盘数据恢复
http://blog.163.com/chengguang868@126/blog/static/73864336201111930065/
2014-08-14 23:10:18
808
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人