上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页
摘要: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or 阅读全文
posted @ 2018-12-03 21:50 A-Little-Nut 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer n, count all numbers with unique digits, x, where 0 ≤ x Given n = 2, return 91. (The answer should be the total numbers i 阅读全文
posted @ 2018-12-03 21:46 A-Little-Nut 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: + Each ele 阅读全文
posted @ 2018-12-03 21:45 A-Little-Nut 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: + Each elemen 阅读全文
posted @ 2018-12-03 21:43 A-Little-Nut 阅读(73) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes a string as input and returns the string reversed. Example: Given s = “hello”, return “olleh”. 分析 Easy 阅读全文
posted @ 2018-12-03 21:42 A-Little-Nut 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2018-12-03 21:41 A-Little-Nut 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and r 阅读全文
posted @ 2018-12-03 21:39 A-Little-Nut 阅读(88) 评论(0) 推荐(0) 编辑
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2018-12-03 21:38 A-Little-Nut 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2018-12-03 21:37 A-Little-Nut 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2 阅读全文
posted @ 2018-12-03 21:36 A-Little-Nut 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 49 下一页