摘要:
原题链接在这里:https://leetcode.com/problems/find-the-difference/ 题目: Given two strings s and t which consist of only lowercase letters. String t is generate
阅读全文
posted @ 2017-01-01 06:15
Dylan_Java_NYC
阅读(196)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/add-strings/ 题目: Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and
阅读全文
posted @ 2016-12-26 09:34
Dylan_Java_NYC
阅读(181)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/add-two-numbers-ii/ 题目: You are given two linked lists representing two non-negative numbers. The most significa
阅读全文
posted @ 2016-12-26 09:03
Dylan_Java_NYC
阅读(1114)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/find-all-anagrams-in-a-string/ 题目: Given a string s and a non-empty string p, find all the start indices of p's
阅读全文
posted @ 2016-12-21 17:21
Dylan_Java_NYC
阅读(282)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/island-perimeter/ 题目: You are given a map in form of a two-dimensional integer grid where 1 represents land and
阅读全文
posted @ 2016-12-19 13:16
Dylan_Java_NYC
阅读(427)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/design-hit-counter/description/ 题目: Design a hit counter which counts the number of hits received in the past 5
阅读全文
posted @ 2016-12-19 12:58
Dylan_Java_NYC
阅读(589)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/logger-rate-limiter/ 题目: Design a logger system that receive stream of messages along with its timestamps, each
阅读全文
posted @ 2016-12-19 12:32
Dylan_Java_NYC
阅读(568)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/moving-average-from-data-stream/ 题目: Given a stream of integers and a window size, calculate the moving average
阅读全文
posted @ 2016-12-15 16:04
Dylan_Java_NYC
阅读(417)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/fizz-buzz/ 题目: Write a program that outputs the string representation of numbers from 1 to n. But for multiples
阅读全文
posted @ 2016-11-10 16:13
Dylan_Java_NYC
阅读(610)
推荐(0)
摘要:
原题链接在这里: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
阅读全文
posted @ 2016-11-10 16:00
Dylan_Java_NYC
阅读(189)
推荐(0)
摘要:
Sorting: OrderBy ThenBy OrderByDescending ThenByDescending Reverse OrderBy a property that can have null value. null value will be sorted at the first
阅读全文
posted @ 2016-10-26 07:25
Dylan_Java_NYC
阅读(226)
推荐(0)
摘要:
In C#, extension methods enable you to add methods to existing class without creating a new derived class. Extension methods 要求: Extension methods cal
阅读全文
posted @ 2016-10-14 03:14
Dylan_Java_NYC
阅读(270)
推荐(0)
摘要:
In C#, out keyword 是argument传值变成passed by reference. out keyword 在同时返回多个值时很有用. 与ref keyword 相似. 若是使用out keyword传argument, 那么在method 的definition 和 使用时都
阅读全文
posted @ 2016-09-14 02:26
Dylan_Java_NYC
阅读(225)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/plus-one-linked-list/ 题目: Given a non-negative number represented as a singly linked list of digits, plus one to
阅读全文
posted @ 2016-09-08 14:50
Dylan_Java_NYC
阅读(667)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/reverse-vowels-of-a-string/ 题目: Write a function that takes a string as input and reverse only the vowels of a s
阅读全文
posted @ 2016-08-27 07:08
Dylan_Java_NYC
阅读(252)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/reverse-string/ 题目: Write a function that reverses a string. The input string is given as an array of characters
阅读全文
posted @ 2016-08-27 05:44
Dylan_Java_NYC
阅读(277)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/power-of-four/ 题目: Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Exam
阅读全文
posted @ 2016-08-20 09:07
Dylan_Java_NYC
阅读(323)
推荐(0)
摘要:
原题链接在这里:http://www.lintcode.com/en/problem/longest-common-substring/# 题目: Given two strings, find the longest common substring. Return the length of i
阅读全文
posted @ 2016-04-03 13:55
Dylan_Java_NYC
阅读(366)
推荐(0)
摘要:
原题链接在这里:http://www.lintcode.com/en/problem/longest-common-subsequence/ 题目: Given two strings, find the longest common subsequence (LCS). Your code sho
阅读全文
posted @ 2016-04-03 13:39
Dylan_Java_NYC
阅读(834)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/coin-change/ 题目: You are given coins of different denominations and a total amount of money amount. Write a func
阅读全文
posted @ 2016-04-03 12:48
Dylan_Java_NYC
阅读(402)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/nested-list-weight-sum/ 题目: Given a nested list of integers, return the sum of all integers in the list weighted
阅读全文
posted @ 2016-04-03 09:59
Dylan_Java_NYC
阅读(1574)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/find-the-celebrity/ 题目: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there
阅读全文
posted @ 2016-04-01 09:11
Dylan_Java_NYC
阅读(480)
推荐(0)
摘要:
查找等差数列中的缺失项. e.g.Input: arr[] = {2, 4, 8, 10, 12, 14} Output: 6 Input: arr[] = {1, 6, 11, 16, 21, 31}; Output: 26. 采用binary search. 若是arr[mid] - arr[l
阅读全文
posted @ 2016-03-30 04:14
Dylan_Java_NYC
阅读(408)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/binary-tree-vertical-order-traversal/ 题目: Given a binary tree, return the vertical order traversal of its nodes'
阅读全文
posted @ 2016-03-30 01:37
Dylan_Java_NYC
阅读(730)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/ 题目: Given an array of numbers, verify whether it is the correct
阅读全文
posted @ 2016-03-28 06:46
Dylan_Java_NYC
阅读(835)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/paint-house-ii/ 题目: There are a row of n houses, each house can be painted with one of the k colors. The cost of
阅读全文
posted @ 2016-03-28 05:25
Dylan_Java_NYC
阅读(774)
推荐(1)
摘要:
原题链接在这里:https://leetcode.com/problems/paint-house/ 题目: There are a row of n houses, each house can be painted with one of the three colors: red, blue
阅读全文
posted @ 2016-03-28 05:04
Dylan_Java_NYC
阅读(886)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/house-robber-iii/ 题目: The thief has found himself a new place for his thievery again. There is only one entrance
阅读全文
posted @ 2016-03-27 04:55
Dylan_Java_NYC
阅读(708)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ 题目: Given an array of integers that is already sorted in ascending order, find
阅读全文
posted @ 2016-03-27 04:04
Dylan_Java_NYC
阅读(278)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/two-sum-iii-data-structure-design/ 题目: Design and implement a TwoSum class. It should support the following oper
阅读全文
posted @ 2016-03-27 03:54
Dylan_Java_NYC
阅读(273)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/odd-even-linked-list/ 题目: Given a singly linked list, group all odd nodes together followed by the even nodes. P
阅读全文
posted @ 2016-03-27 03:21
Dylan_Java_NYC
阅读(382)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/burst-balloons/ 题目: Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represe
阅读全文
posted @ 2016-03-26 12:05
Dylan_Java_NYC
阅读(405)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/count-of-range-sum/ 题目: Given an integer array nums, return the number of range sums that lie in [lower, upper]
阅读全文
posted @ 2016-03-26 07:39
Dylan_Java_NYC
阅读(373)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/ 题目: The API: int read4(char *buf) reads 4 characters at a
阅读全文
posted @ 2016-03-26 05:03
Dylan_Java_NYC
阅读(414)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/read-n-characters-given-read4/ 题目: The API: int read4(char *buf) reads 4 characters at a time from a file. The r
阅读全文
posted @ 2016-03-26 04:39
Dylan_Java_NYC
阅读(516)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/shortest-distance-from-all-buildings/ 题目: You want to build a house on an empty land which reaches all buildings
阅读全文
posted @ 2016-03-25 06:07
Dylan_Java_NYC
阅读(660)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/smallest-rectangle-enclosing-black-pixels/ 题目: An image is represented by a binary matrix with 0 as a white pixe
阅读全文
posted @ 2016-03-25 05:08
Dylan_Java_NYC
阅读(383)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/count-of-smaller-numbers-after-self/ 题目: You are given an integer array nums and you have to return a new counts
阅读全文
posted @ 2016-03-23 05:36
Dylan_Java_NYC
阅读(568)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/reconstruct-itinerary/description/ 题目: Given a list of airline tickets represented by pairs of departure and arr
阅读全文
posted @ 2016-03-23 01:23
Dylan_Java_NYC
阅读(994)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/minimum-height-trees/ 题目: For a undirected graph with tree characteristics, we can choose any node as the root.
阅读全文
posted @ 2016-03-21 12:18
Dylan_Java_NYC
阅读(374)
推荐(0)