上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2019-06-26 14:56 lpomeloz 阅读(143) 评论(0) 推荐(0) 编辑
摘要: We want to use quad trees to store an N x N boolean grid. Each cell in the grid can only be true or false. The root node represents the whole grid. Fo 阅读全文
posted @ 2019-06-25 21:17 lpomeloz 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 题目大意: 给定两个非负整数,用字符串表示。计算两个整数的和。 理 解: 涉及到大数 阅读全文
posted @ 2019-06-24 18:31 lpomeloz 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi 阅读全文
posted @ 2019-06-24 13:32 lpomeloz 阅读(137) 评论(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 @ 2019-06-21 21:15 lpomeloz 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
posted @ 2019-06-21 20:53 lpomeloz 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: Example 1: Example 2: 阅读全文
posted @ 2019-06-21 20:09 lpomeloz 阅读(87) 评论(0) 推荐(0) 编辑
摘要: A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文
posted @ 2019-06-21 16:35 lpomeloz 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Find the sum of all left leaves in a given binary tree. Example: 题目大意: 求所有左叶子节点的和。 理 解: 判断某个节点是否位左叶子节点:当前节点的左子节点非空,左子节点左右子树为空。 递归根节点的左右子树,累加所有左子节点的和。 阅读全文
posted @ 2019-06-20 17:11 lpomeloz 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... Note:n is positive and will fit within the range of a 32-bi 阅读全文
posted @ 2019-06-19 22:06 lpomeloz 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页