- 博客(26)
- 收藏
- 关注
原创 开始刷leetcode day79: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-07-28 13:00:33 385
原创 测试server是否block port或者网站
网站:paping apitest.authorize.net -p 443or ping api.test.authorize.netSMTP port 25 blocked or nottelnet my-domain-name.com 25
2015-07-28 03:40:19 732
原创 开始刷leetcode day78:Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next()
2015-07-27 12:21:44 349
转载 开始刷leetcode day78:Lowest Common Ancestor of a Binary Tree
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two node
2015-07-27 11:37:26 386
翻译 在windows server 2008 R2上运行disk cleanup
通常情况下可以在开始-〉Accessories->system tools 里直接找到Disk cleanup但是在windows server 2008 R2里, 找不到。为了可以使用cleanmgr, 需要复制两个文件:cleanmgr.exe, cleanmgr.exe.mui不同的服务器,会在不同的文件夹下找到:Operating S
2015-07-24 02:17:25 4235
转载 读书笔记 day1:The design of approximation algorithms
Chapter 1As P not equal to NP, we cannot simultaneously have algorithms that 1. find optimal solutions; 2. in polynomial time; 3. for any instance.At least one of these requirements need to be
2015-07-23 05:53:58 1028
原创 Bug record1: The underlying connection was closed: The connection was closed unexpectedly.Then
Description:Setting up a c# console form for testing another web service called api.svc.After running the web service and make sure it is running correctly, we create the service reference inside
2015-07-23 00:33:28 1790
原创 开始刷leetcode day72: Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti
2015-07-20 10:40:49 313
原创 开始刷leetcode day72:Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solut
2015-07-20 10:33:46 306
转载 开始刷leedtcode day72:Product of Array Except Self
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O
2015-07-20 09:57:42 502
转载 开始刷leetcode day72: Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST's total elements.Follow up:What if the
2015-07-20 09:14:53 451
原创 开始刷leetcode day71: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 linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value
2015-07-19 10:48:42 549
原创 开始刷leetcode day71: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"].Credits:Special thanks to @jianchao.li.fighter
2015-07-19 10:43:03 279
原创 开始刷leetcode day71: Power of Two
Given an integer, write a function to determine if it is a power of two.Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.Java:public c
2015-07-19 10:09:56 369
原创 funny makeup story
Yun's Post Apocalyptic Blog Entry 1: Day 1 Hour 1: It's lonely in here. I didn't think the apocalypse would come in the form of coffee zombies. I have my trusty PS Vita and the monitor arm
2015-07-18 02:31:45 621
转载 开始刷leetcode day63:House Robber II
Note: This is an extension of House Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time
2015-07-13 06:42:12 334
转载 开始刷leetcode day63:Contains Duplicate III
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i an
2015-07-13 06:04:55 312
原创 开始刷leetcode day63:Contains Duplicate II
Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between iand j is at most
2015-07-13 05:28:51 252
原创 开始刷leetcode day63: 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 element
2015-07-13 05:23:00 282
原创 开始刷leetcode day63:Invert Binary Tree
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this original tweet by Max Howell
2015-07-13 05:16:07 257
原创 开始刷leetcode day63: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 element from in front of queue.peek() -- Get the front element.empty(
2015-07-13 05:08:02 275
原创 开始刷leetcode day62:Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined betw
2015-07-12 05:48:47 287
原创 开始刷leetcode day62: Subsets II
Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain du
2015-07-12 05:01:27 216
原创 Subsets
Given a set of distinct integers, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For
2015-07-12 04:19:18 276
原创 开始刷leetcode day60: Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the
2015-07-08 13:47:17 248
原创 开始刷leetcode day59: Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the
2015-07-06 11:20:17 283
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人