上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 28 下一页
摘要: 题目: Given two binary strings, return their sum (also a binary string). 给定两个二进制字符串,返回它们的总和(也是二进制字符串)。 The input strings are both non-empty and contains 阅读全文
posted @ 2018-09-07 20:46 chan_ai_chao 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement the following operations of a stack using queues. 使用队列实现堆栈的以下操作。 push(x) -- Push element x onto stack. push(x) - 将元素x推入堆栈。 pop() -- Remo 阅读全文
posted @ 2018-09-07 20:25 chan_ai_chao 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 三个问题 1.netty是如何判断ChannelHandler类型的? 当调用pipeline添加一个节点时,netty会使用instanceof关键词来判断当前节点是属于inbound类型还是outbound类型,分别用一个boolean类型的变量来标识 2.对于ChannelHandler的添加 阅读全文
posted @ 2018-09-06 19:17 chan_ai_chao 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 given su 阅读全文
posted @ 2018-09-06 17:08 chan_ai_chao 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of characters, compress it in-place. 给定一组字符,就地压缩它。 The length after compression must always be smaller than or equal to the origina 阅读全文
posted @ 2018-09-06 09:48 chan_ai_chao 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 题目: Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. 计算字符串中的段数,其中段定义为非空格字符的连续 阅读全文
posted @ 2018-09-05 20:51 chan_ai_chao 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 题目: You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. 您想要以楼梯形状形成总共n个硬币,其中每个第k行必须 阅读全文
posted @ 2018-09-05 19:47 chan_ai_chao 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer n, return the number of trailing zeroes in n!. 给定一个整数n,返回n!中的尾随零数。 Example 1: Example 2: Note: Your solution should be in logarit 阅读全文
posted @ 2018-09-04 22:10 chan_ai_chao 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 题目: We are playing the Guess Game. The game is as follows: 我们正在玩猜猜游戏。 游戏如下: I pick a number from 1 to n. You have to guess which number I picked. 我从1到 阅读全文
posted @ 2018-09-04 20:27 chan_ai_chao 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. 给定排序的数组nums,就地删除重复项,使 阅读全文
posted @ 2018-09-04 19:52 chan_ai_chao 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 28 下一页