- 博客(5)
- 收藏
- 关注
原创 construct-binary-tree-from-preorder-and-inorder
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree./** * Definition for binary tree * struct TreeNode { *
2017-05-24 22:05:02 358
原创 n-queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens puzzle. Each sol
2017-05-22 11:46:28 383
原创 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 lists./** * Definition for singly-linked list. * struct List
2017-05-22 10:23:53 415
原创 anagrams
Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case题目的意思是如果字符串容器中存在同构词(包含相同字母),则将同构词保存下来,需要的注意的是第一次出现的单词的处理.class Solution {public: v
2017-05-04 22:58:14 346
原创 minimum-window-substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S =”ADOBECODEBANC” T =”ABC” Minimum window is”BANC”. Note:
2017-05-04 21:22:52 401
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人