上一页 1 2 3 4 5 6 ··· 11 下一页

2016年8月20日

101. Symmetric Tree

摘要: 1. 问题描述 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Note: Bonus points if you could solve it both r 阅读全文

posted @ 2016-08-20 23:43 whl-hl 阅读(160) 评论(0) 推荐(0) 编辑

2016年8月18日

198. House Robber

摘要: 1. 问题描述 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint sto 阅读全文

posted @ 2016-08-18 23:29 whl-hl 阅读(111) 评论(0) 推荐(0) 编辑

2016年8月17日

110. Balanced Binary Tree

摘要: 1. 问题描述 Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which t 阅读全文

posted @ 2016-08-17 22:08 whl-hl 阅读(136) 评论(0) 推荐(0) 编辑

2016年8月16日

235. Lowest Common Ancestor of a Binary Search Tree

摘要: 1. 问题描述 Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wi 阅读全文

posted @ 2016-08-16 22:35 whl-hl 阅读(118) 评论(0) 推荐(0) 编辑

2016年8月9日

263. Ugly Number

摘要: 1. 问题描述 Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. 阅读全文

posted @ 2016-08-09 22:21 whl-hl 阅读(101) 评论(0) 推荐(0) 编辑

202. Happy Number

摘要: 1. 问题描述 Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive 阅读全文

posted @ 2016-08-09 22:07 whl-hl 阅读(97) 评论(0) 推荐(0) 编辑

2016年8月8日

141. Linked List Cycle

摘要: 1. 问题描述 Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Tags: Linked List Two PointersSimi 阅读全文

posted @ 2016-08-08 23:34 whl-hl 阅读(102) 评论(0) 推荐(0) 编辑

70. Climbing Stairs

摘要: 1. 问题描述 You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can 阅读全文

posted @ 2016-08-08 22:39 whl-hl 阅读(116) 评论(0) 推荐(0) 编辑

2016年8月6日

28. Implement strStr()

摘要: 1. 问题描述 Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Tags:Two Pointers 阅读全文

posted @ 2016-08-06 23:23 whl-hl 阅读(161) 评论(0) 推荐(0) 编辑

2016年8月5日

112. Path Sum

摘要: 1. 问题描述 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the give 阅读全文

posted @ 2016-08-05 23:22 whl-hl 阅读(160) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 11 下一页

导航