随笔分类 -  Weekly Contest

摘要:Given an undirected tree consisting of n vertices numbered from 0 to n-1, which has some apples in their vertices. You spend 1 second to walk over one 阅读全文 »
posted @ 2020-05-10 18:05 Veritas_des_Liberty 阅读(323) 评论(0) 推荐(0) 编辑
摘要:1408. String Matching in an Array Given an array of string words. Return all strings in words which is substring of another word in any order. String  阅读全文 »
posted @ 2020-04-12 17:45 Veritas_des_Liberty 阅读(243) 评论(0) 推荐(0) 编辑
摘要:1071. Greatest Common Divisor of Strings For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or mor 阅读全文 »
posted @ 2019-06-02 16:33 Veritas_des_Liberty 阅读(325) 评论(0) 推荐(0) 编辑
摘要:1046. Last Stone Weight We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose the two heaviest rocks and smash 阅读全文 »
posted @ 2019-05-19 15:21 Veritas_des_Liberty 阅读(390) 评论(0) 推荐(0) 编辑
摘要:1030. Matrix Cells in Distance Order We are given a matrix with R rows and C columns has cells with integer coordinates (r, c), where 0 <= r < R and 0 阅读全文 »
posted @ 2019-04-21 17:09 Veritas_des_Liberty 阅读(249) 评论(0) 推荐(0) 编辑
摘要:1025. Divisor Game Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a number N on the chalkboard. On each playe 阅读全文 »
posted @ 2019-04-14 17:50 Veritas_des_Liberty 阅读(314) 评论(0) 推荐(0) 编辑
摘要:1021. Remove Outermost Parentheses A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strin 阅读全文 »
posted @ 2019-04-07 20:39 Veritas_des_Liberty 阅读(234) 评论(0) 推荐(0) 编辑
摘要:1029. Binary Prefix Divisible By 5 Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (fr 阅读全文 »
posted @ 2019-03-31 12:15 Veritas_des_Liberty 阅读(201) 评论(0) 推荐(0) 编辑
摘要:1020. Partition Array Into Three Parts With Equal Sum Given an array A of integers, return true if and only if we can partition the array into three n 阅读全文 »
posted @ 2019-03-24 14:40 Veritas_des_Liberty 阅读(251) 评论(0) 推荐(0) 编辑
摘要:1012. Complement of Base 10 Integer Every non-negative integer N has a binary representation. For example, 5 can be represented as "101" in binary, 11 阅读全文 »
posted @ 2019-03-17 17:19 Veritas_des_Liberty 阅读(238) 评论(0) 推荐(0) 编辑
摘要:984. String Without AAA or BBB Given two integers A and B, return any string S such that: S has length A + B and contains exactly A 'a' letters, and e 阅读全文 »
posted @ 2019-01-27 13:21 Veritas_des_Liberty 阅读(260) 评论(0) 推荐(0) 编辑
摘要:970. Powerful Integers Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0 阅读全文 »
posted @ 2019-01-06 12:43 Veritas_des_Liberty 阅读(221) 评论(0) 推荐(0) 编辑
摘要:965. Univalued Binary Tree A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univa 阅读全文 »
posted @ 2018-12-30 13:40 Veritas_des_Liberty 阅读(312) 评论(0) 推荐(0) 编辑
摘要:961. N-Repeated Element in Size 2N Array In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times 阅读全文 »
posted @ 2018-12-23 12:57 Veritas_des_Liberty 阅读(247) 评论(0) 推荐(0) 编辑
摘要:958. Check Completeness of a Binary Tree Given a binary tree, determine if it is a complete binary tree. Definition of a complete binary tree from Wik 阅读全文 »
posted @ 2018-12-16 12:53 Veritas_des_Liberty 阅读(216) 评论(0) 推荐(0) 编辑
摘要:955. Delete Columns to Make Sorted II We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of del 阅读全文 »
posted @ 2018-12-09 17:02 Veritas_des_Liberty 阅读(260) 评论(0) 推荐(0) 编辑
摘要:949. Largest Time for Given Digits (string::compare) Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hou 阅读全文 »
posted @ 2018-12-02 12:55 Veritas_des_Liberty 阅读(229) 评论(0) 推荐(0) 编辑
摘要:945. Minimum Increment to Make Array Unique Given an array of integers A, a move consists of choosing any A[i], and incrementing it by 1. Return the l 阅读全文 »
posted @ 2018-11-25 12:44 Veritas_des_Liberty 阅读(362) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示