上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 76 下一页
摘要: Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example 阅读全文
posted @ 2018-11-30 15:14 bernieloveslife 阅读(91) 评论(0) 推荐(0)
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2018-11-30 15:14 bernieloveslife 阅读(80) 评论(0) 推荐(0)
摘要: Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
posted @ 2018-11-30 15:14 bernieloveslife 阅读(120) 评论(0) 推荐(0)
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode left; TreeLinkNode right; TreeLinkNode next; } Populate each next pointer to point to its next 阅读全文
posted @ 2018-11-30 15:13 bernieloveslife 阅读(123) 评论(0) 推荐(0)
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode left; TreeLinkNode right; TreeLinkNode next; } Populate each next pointer to point to its next 阅读全文
posted @ 2018-11-30 15:13 bernieloveslife 阅读(108) 评论(0) 推荐(0)
摘要: Given a binary tree, flatten it to a linked list in place. For example, given the following tree: The flattened tree should look like: 阅读全文
posted @ 2018-11-30 15:13 bernieloveslife 阅读(75) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2018-11-30 15:13 bernieloveslife 阅读(93) 评论(0) 推荐(0)
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example 阅读全文
posted @ 2018-11-30 15:13 bernieloveslife 阅读(117) 评论(0) 推荐(0)
摘要: A robot is located at the top left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2018-11-07 13:08 bernieloveslife 阅读(115) 评论(0) 推荐(0)
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2018-11-07 13:08 bernieloveslife 阅读(108) 评论(0) 推荐(0)
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 76 下一页