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

2016年6月26日

100. Same Tree

摘要: 1. 问题描述 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally ide 阅读全文

posted @ 2016-06-26 22:13 whl-hl 阅读(150) 评论(0) 推荐(0) 编辑

2016年6月23日

226. Invert Binary Tree

摘要: 1. 问题描述 Invert a binary tree. to Tag: Tree /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right 阅读全文

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

169. Majority Element

摘要: 1. 问题描述 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume t 阅读全文

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

2016年6月18日

349. Intersection of Two Arrays

摘要: 1. 问题描述 Given two arrays, write a function to compute their intersection. Example: Note: Each element in the result must be unique.The result can be i 阅读全文

posted @ 2016-06-18 19:27 whl-hl 阅读(158) 评论(0) 推荐(0) 编辑

104. Maximum Depth of Binary Tree

摘要: 1. 问题描述 Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the far 阅读全文

posted @ 2016-06-18 19:06 whl-hl 阅读(122) 评论(0) 推荐(0) 编辑

258. Add Digits

摘要: 1. 问题描述 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example: Given num = 38, the process i 阅读全文

posted @ 2016-06-18 18:49 whl-hl 阅读(109) 评论(0) 推荐(0) 编辑

292. Nim Game

摘要: 1. 问题描述 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 t 阅读全文

posted @ 2016-06-18 17:53 whl-hl 阅读(112) 评论(0) 推荐(0) 编辑

2016年6月17日

21. Merge Two Sorted Lists

摘要: 1. 问题描述 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.T 阅读全文

posted @ 2016-06-17 21:44 whl-hl 阅读(124) 评论(0) 推荐(0) 编辑

2016年6月16日

43. Multiply Strings

摘要: 1. 问题描述 Given two numbers represented as strings, return multiplication of the numbers as a string.Note:The numbers can be arbitrarily large and are n 阅读全文

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

2016年6月15日

66. Plus One

摘要: 1. 问题描述 Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant di 阅读全文

posted @ 2016-06-15 22:22 whl-hl 阅读(203) 评论(0) 推荐(0) 编辑

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

导航