摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2019-10-22 11:47 xuan_abc 阅读(134) 评论(0) 推荐(0)
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2019-10-21 07:10 xuan_abc 阅读(82) 评论(0) 推荐(0)
摘要: Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Could you 阅读全文
posted @ 2019-10-21 06:08 xuan_abc 阅读(122) 评论(0) 推荐(0)
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, w 阅读全文
posted @ 2019-10-21 05:44 xuan_abc 阅读(186) 评论(0) 推荐(0)
摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2019-10-21 05:16 xuan_abc 阅读(318) 评论(0) 推荐(0)
摘要: 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-10-21 04:19 xuan_abc 阅读(116) 评论(0) 推荐(0)
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: 阅读全文
posted @ 2019-10-20 11:02 xuan_abc 阅读(108) 评论(0) 推荐(0)
摘要: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
posted @ 2019-10-20 09:41 xuan_abc 阅读(119) 评论(0) 推荐(0)
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2019-10-20 04:15 xuan_abc 阅读(118) 评论(0) 推荐(0)
摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] # Definition for a bina 阅读全文
posted @ 2019-10-18 20:38 xuan_abc 阅读(94) 评论(0) 推荐(0)