上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 76 下一页
摘要: Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer 阅读全文
posted @ 2020-08-29 01:37 Schwifty 阅读(184) 评论(0) 推荐(0)
摘要: Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than or equal to the end point o 阅读全文
posted @ 2020-08-28 04:26 Schwifty 阅读(119) 评论(0) 推荐(0)
摘要: Given the root of a binary tree with N nodes, each node in the tree has node.val coins, and there are N coins total. In one move, we may choose two ad 阅读全文
posted @ 2020-08-26 13:36 Schwifty 阅读(128) 评论(0) 推荐(0)
摘要: At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bil 阅读全文
posted @ 2020-08-26 12:13 Schwifty 阅读(119) 评论(0) 推荐(0)
摘要: Given a list of non-overlapping axis-aligned rectangles rects, write a function pick which randomly and uniformily picks an integer point in the space 阅读全文
posted @ 2020-08-23 06:09 Schwifty 阅读(131) 评论(0) 推荐(0)
摘要: Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting paren 阅读全文
posted @ 2020-08-21 04:27 Schwifty 阅读(106) 评论(0) 推荐(0)
摘要: Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop o 阅读全文
posted @ 2020-08-21 03:53 Schwifty 阅读(104) 评论(0) 推荐(0)
摘要: A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the 阅读全文
posted @ 2020-08-20 05:09 Schwifty 阅读(119) 评论(0) 推荐(0)
摘要: Return all non-negative integers of length N such that the absolute difference between every two consecutive digits is K. Note that every number in th 阅读全文
posted @ 2020-08-18 21:59 Schwifty 阅读(173) 评论(0) 推荐(0)
摘要: Alice has a hand of cards, given as an array of integers. Now she wants to rearrange the cards into groups so that each group is size W, and consists 阅读全文
posted @ 2020-08-18 13:38 Schwifty 阅读(111) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 76 下一页