上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

2018年10月20日

摘要: Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1: Input: 5 O 阅读全文
posted @ 2018-10-20 11:21 chiyeung 阅读(167) 评论(0) 推荐(0) 编辑

2018年10月19日

摘要: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Note: 阅读全文
posted @ 2018-10-19 09:51 chiyeung 阅读(170) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2018-10-19 09:20 chiyeung 阅读(310) 评论(0) 推荐(0) 编辑

2018年10月18日

摘要: 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 farthest l 阅读全文
posted @ 2018-10-18 11:55 chiyeung 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2018-10-18 11:40 chiyeung 阅读(113) 评论(0) 推荐(0) 编辑

2018年10月14日

摘要: Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and o 阅读全文
posted @ 2018-10-14 10:42 chiyeung 阅读(237) 评论(0) 推荐(0) 编辑

2018年10月13日

摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2018-10-13 10:12 chiyeung 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
posted @ 2018-10-13 09:06 chiyeung 阅读(198) 评论(0) 推荐(0) 编辑

2018年10月12日

摘要: Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th 阅读全文
posted @ 2018-10-12 13:40 chiyeung 阅读(158) 评论(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 might 阅读全文
posted @ 2018-10-12 13:28 chiyeung 阅读(134) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

导航