随笔分类 - Divide and Conquer
发表于 2019-01-31 22:37阅读:255评论:0推荐:0
摘要:For some fixed N, an array A is beautiful if it is a permutation of the integers 1, 2, ..., N, such that: For every i < j, there is no k with i < k <
阅读全文 »
发表于 2019-01-30 23:04阅读:358评论:0推荐:0
摘要:In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to s
阅读全文 »
发表于 2019-01-30 22:09阅读:161评论:0推荐:0
摘要:Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloon
阅读全文 »
发表于 2019-01-28 19:23阅读:163评论:0推荐:0
摘要:Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th
阅读全文 »
发表于 2019-01-28 18:27阅读:145评论:0推荐:0
摘要:Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the d
阅读全文 »
发表于 2019-01-28 18:23阅读:183评论:0推荐:0
摘要:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the
阅读全文 »