上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

2017年9月29日

摘要: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans 阅读全文
posted @ 2017-09-29 09:36 Wanna_Go 阅读(121) 评论(0) 推荐(0) 编辑

2017年9月28日

摘要: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element i 阅读全文
posted @ 2017-09-28 09:35 Wanna_Go 阅读(151) 评论(0) 推荐(0) 编辑

2017年9月27日

摘要: Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 阅读全文
posted @ 2017-09-27 09:28 Wanna_Go 阅读(157) 评论(0) 推荐(0) 编辑

2017年9月26日

摘要: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve 阅读全文
posted @ 2017-09-26 19:49 Wanna_Go 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree and the lowest and highest boundaries as `L`and `R`, trim the tree so that all its elements lies in `[L, R]` (R >= L). You 阅读全文
posted @ 2017-09-26 19:49 Wanna_Go 阅读(195) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays(without duplicates)nums1andnums2wherenums1’s elements are subset ofnums2. Find all the next greater numbers fornums1's elemen 阅读全文
posted @ 2017-09-26 19:48 Wanna_Go 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Input: 3 / \ 9 20 / \ 15 7 Outp 阅读全文
posted @ 2017-09-26 19:47 Wanna_Go 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 翻转二叉树,本题属于容易题题目容易理解,可以通过层次遍历方法进行反转,类似【637. Average of Levels in Binary Tr 阅读全文
posted @ 2017-09-26 19:46 Wanna_Go 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear once. Find all the elements of [1,n] incl 阅读全文
posted @ 2017-09-26 19:46 Wanna_Go 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of 阅读全文
posted @ 2017-09-26 19:45 Wanna_Go 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

导航