上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 77 下一页
摘要: You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin 阅读全文
posted @ 2020-10-26 23:34 苗妙苗 阅读(89) 评论(0) 推荐(0)
摘要: 思路:就是把gcd拆一下,因为如果GCD可以,这些数就也可以3,6 gcd = n = 3 1/3 没了,0 += 2 GCD辗转相除法:b一开始是除数,后来是余数。余数为0就行了 16 4 4,4 4,0 所以返回a = 4 https://www.geeksforgeeks.org/common 阅读全文
posted @ 2020-10-26 10:19 苗妙苗 阅读(91) 评论(0) 推荐(0)
摘要: Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ 阅读全文
posted @ 2020-10-25 23:05 苗妙苗 阅读(76) 评论(0) 推荐(0)
摘要: Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in 阅读全文
posted @ 2020-10-25 09:57 苗妙苗 阅读(251) 评论(0) 推荐(0)
摘要: Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: 阅读全文
posted @ 2020-10-25 00:39 苗妙苗 阅读(89) 评论(0) 推荐(0)
摘要: Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1, 阅读全文
posted @ 2020-10-24 11:20 苗妙苗 阅读(115) 评论(0) 推荐(0)
摘要: Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. Example:Assume that words = ["p 阅读全文
posted @ 2020-10-21 22:45 苗妙苗 阅读(146) 评论(0) 推荐(0)
摘要: 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 @ 2020-10-21 10:18 苗妙苗 阅读(146) 评论(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-10-20 10:46 苗妙苗 阅读(129) 评论(0) 推荐(0)
摘要: Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearrang 阅读全文
posted @ 2020-10-19 22:27 苗妙苗 阅读(116) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 77 下一页