上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页
摘要: Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Example 1: Given 阅读全文
posted @ 2018-10-09 14:21 轻风舞动 阅读(1608) 评论(0) 推荐(0) 编辑
摘要: In an election, the i-th vote was cast for persons[i] at time times[i]. Now, we would like to implement the following query function: TopVotedCandidat 阅读全文
posted @ 2018-10-09 04:47 轻风舞动 阅读(1344) 评论(0) 推荐(0) 编辑
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2018-10-09 02:40 轻风舞动 阅读(862) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes  阅读全文
posted @ 2018-10-09 02:24 轻风舞动 阅读(1308) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Note: 新题中没有提示,老版的有。 阅读全文
posted @ 2018-10-09 02:13 轻风舞动 阅读(439) 评论(0) 推荐(0) 编辑
摘要: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example 阅读全文
posted @ 2018-10-09 02:02 轻风舞动 阅读(389) 评论(0) 推荐(0) 编辑
摘要: In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (wi 阅读全文
posted @ 2018-10-07 15:57 轻风舞动 阅读(633) 评论(0) 推荐(0) 编辑
摘要: Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given 阅读全文
posted @ 2018-10-07 14:48 轻风舞动 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups b 阅读全文
posted @ 2018-10-06 15:07 轻风舞动 阅读(353) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the vali 阅读全文
posted @ 2018-10-06 07:34 轻风舞动 阅读(638) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页