上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 64 下一页
摘要: Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100 阅读全文
posted @ 2020-03-26 05:09 CNoodle 阅读(166) 评论(0) 推荐(0)
摘要: Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You mus 阅读全文
posted @ 2020-03-26 03:01 CNoodle 阅读(522) 评论(0) 推荐(0)
摘要: 弱智题。就是在做if语句的判断,最后输出的是一个数组。 3的倍数输出Fizz,5的倍数输出Buzz,同时为3和5的倍数输出FizzBuzz。例子, Example: n = 15, Return: [ "1", "2", "Fizz", "4", "Buzz", "Fizz", "7", "8", 阅读全文
posted @ 2020-03-25 13:35 CNoodle 阅读(182) 评论(0) 推荐(0)
摘要: Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive. Example 1: I 阅读全文
posted @ 2020-03-25 13:26 CNoodle 阅读(156) 评论(0) 推荐(0)
摘要: You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the le 阅读全文
posted @ 2020-03-25 13:21 CNoodle 阅读(177) 评论(0) 推荐(0)
摘要: 这两题我放在一起说是因为思路一模一样,没什么值得研究的。思路都是用对数的换底公式去判断。 Reference, https://blog.csdn.net/qy20115549/article/details/52849280 JavaScript实现 1 /** 2 * @param {numbe 阅读全文
posted @ 2020-03-25 13:20 CNoodle 阅读(160) 评论(0) 推荐(0)
摘要: Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such th 阅读全文
posted @ 2020-03-25 13:19 CNoodle 阅读(157) 评论(0) 推荐(0)
摘要: Given an input string, reverse the string word by word. Example: Input: ["t","h","e"," ","s","k","y"," ","i","s"," ","b","l","u","e"] Output: ["b 阅读全文
posted @ 2020-03-24 06:50 CNoodle 阅读(229) 评论(0) 推荐(0)
摘要: Given an input string, reverse the string word by word. Example 1: Input: "the sky is blue" Output: "blue is sky the" Example 2: Input: " hello world! 阅读全文
posted @ 2020-03-24 05:19 CNoodle 阅读(600) 评论(0) 推荐(0)
摘要: Given a list of non-negative integers nums, arrange them such that they form the largest number. Note: The result may be very large, so you need to re 阅读全文
posted @ 2020-03-24 02:18 CNoodle 阅读(182) 评论(0) 推荐(0)
摘要: Given a non-empty, singly linked list with head node head, return a middle node of linked list. If there are two middle nodes, return the second middl 阅读全文
posted @ 2020-03-23 14:32 CNoodle 阅读(135) 评论(0) 推荐(0)
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any 阅读全文
posted @ 2020-03-23 14:17 CNoodle 阅读(561) 评论(0) 推荐(0)
摘要: You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to th 阅读全文
posted @ 2020-03-23 12:25 CNoodle 阅读(448) 评论(0) 推荐(0)
摘要: There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-rig 阅读全文
posted @ 2020-03-23 09:40 CNoodle 阅读(438) 评论(0) 推荐(0)
摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2020-03-22 12:12 CNoodle 阅读(423) 评论(0) 推荐(0)
摘要: You are given the root of a binary tree containing digits from 0 to 9 only. Each root-to-leaf path in the tree represents a number. For example, the r 阅读全文
posted @ 2020-03-22 11:59 CNoodle 阅读(460) 评论(0) 推荐(0)
摘要: Given the root of a complete binary tree, return the number of the nodes in the tree. According to Wikipedia, every level, except possibly the last, i 阅读全文
posted @ 2020-03-22 03:22 CNoodle 阅读(319) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2020-03-21 14:32 CNoodle 阅读(353) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2020-03-21 11:34 CNoodle 阅读(191) 评论(0) 推荐(0)
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. The successor of a node p is the node with the small 阅读全文
posted @ 2020-03-20 12:00 CNoodle 阅读(260) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 64 下一页