11 2015 档案
摘要:原题链接在这里:https://leetcode.com/problems/path-sum/ 题目: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up a
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/merge-sorted-array/ 题目: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted ar
阅读全文
摘要:HDS(11.16.2015):How to design an non-stop website like Google or Amazon?What design patterns are you using?Implement a queue with two stacks.Quick-sor...
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/contains-duplicate/ 题目: Given an array of integers, find if the array contains any duplicates. Your function sho
阅读全文
摘要:原题链接在这里: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, g
阅读全文
摘要:What is the relationship and differences between processes and threads?A process usually represent an indepentdent execution unit with its own memory ...
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/range-sum-query-2d-immutable/ 题目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle de
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/range-sum-query-immutable/ 题目: Given an integer array nums, find the sum of the elements between indices i and j
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/remove-invalid-parentheses/ 题目: Remove the minimum number of invalid parentheses in order to make the input stri
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/word-ladder-ii/ 题目: Given two words (beginWord and endWord), and a dictionary's word list, find all shortest tra
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/wildcard-matching/ 题目: Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/regular-expression-matching/ 题目: Implement regular expression matching with support for '.' and '*'. 题解: When it
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/valid-number/ 题目: Validate if a given string can be interpreted as a decimal number. Some examples:"0" => true"
阅读全文
摘要:原题链接在这里: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 s
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/text-justification/ 题目: Given an array of words and a width maxWidth, format the text such that each line has ex
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/word-search-ii/ 题目: Given a 2D board and a list of words from the dictionary, find all words in the board. Each
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/word-search/ 题目: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed f
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/the-skyline-problem/ 题目: A city's skyline is the outer contour of the silhouette formed by all the buildings in
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/candy/ There are N children standing in a line. Each child is assigned a rating value. You are giving candies to
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/sliding-window-maximum/ 题目: Given an array nums, there is a sliding window of size k which is moving from the ve
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/maximum-gap/ 题目: Given an unsorted array, find the maximum difference between the successive elements in its sor
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/integer-to-english-words/ 题目: Convert a non-negative integer to its english words representation. Given input is
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/lru-cache/ 题目: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/find-median-from-data-stream/ 题目: Median is the middle value in an ordered integer list. If the size of the list
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/serialize-and-deserialize-binary-tree/ 题目: Serialization is the process of converting a data structure or object
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/design-add-and-search-words-data-structure/ 题目: Design a data structure that supports adding new words and findi
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/largest-number/ 题目: Given a list of non negative integers, arrange them such that they form the largest number.
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/repeated-dna-sequences/ 题目: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for ex
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/bulls-and-cows/ 题目: You are playing the following Bulls and Cows game with your friend: You write down a number
阅读全文