上一页 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 轻风舞动 阅读(1612) 评论(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 轻风舞动 阅读(1347) 评论(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 轻风舞动 阅读(865) 评论(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 轻风舞动 阅读(1322) 评论(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 轻风舞动 阅读(442) 评论(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 轻风舞动 阅读(392) 评论(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 轻风舞动 阅读(635) 评论(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 轻风舞动 阅读(1147) 评论(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 轻风舞动 阅读(356) 评论(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 轻风舞动 阅读(643) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页