摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 阅读全文
posted @ 2019-03-08 01:32 Schwifty 阅读(124) 评论(0) 推荐(0)
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2019-03-07 14:36 Schwifty 阅读(116) 评论(0) 推荐(0)
摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: 阅读全文
posted @ 2019-03-07 06:20 Schwifty 阅读(95) 评论(0) 推荐(0)
摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2019-03-07 05:20 Schwifty 阅读(106) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2019-03-07 04:36 Schwifty 阅读(150) 评论(0) 推荐(0)
摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2019-03-06 13:29 Schwifty 阅读(151) 评论(0) 推荐(0)
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Example 2: Follow up: A straight forward solu 阅读全文
posted @ 2019-03-05 14:09 Schwifty 阅读(117) 评论(0) 推荐(0)
摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2019-03-05 05:37 Schwifty 阅读(119) 评论(0) 推荐(0)
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2019-02-22 06:38 Schwifty 阅读(1013) 评论(0) 推荐(0)
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: 和permutation1类似,多了一个判断重复元素的条件。 下面是转载自ht 阅读全文
posted @ 2019-02-21 15:03 Schwifty 阅读(194) 评论(0) 推荐(0)