trick
Goofiness
这个作者很懒,什么都没留下…
展开
-
[LeetCode]Last Stone Weight II@Golang
Last Stone Weight II We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose any two rocks and smash them together. Suppose the stones have weights x and y with x...原创 2019-10-31 23:34:16 · 240 阅读 · 0 评论 -
[LeetCode]Push Dominoes@Golang
Push Dominoes There are N dominoes in a line, and we place each domino vertically upright. In the beginning, we simultaneously push some of the dominoes either to the left or to the right. After each ...原创 2019-10-10 22:00:29 · 155 阅读 · 0 评论 -
[LeetCode]2 Keys Keyboard@Python
2 Keys Keyboard Initially on a notepad only one character ‘A’ is present. You can perform two operations on this notepad for each step: Copy All: You can copy all the characters present on the notepa...原创 2019-09-11 15:19:47 · 92 阅读 · 0 评论 -
[LeetCode]Set Mismatch@Python
Set Mismatch The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another number in the set, which results in re...原创 2019-07-02 23:29:58 · 143 阅读 · 0 评论 -
[LeetCode]Task Scheduler@Python
Task Scheduler Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks could be done without original order. E...原创 2019-06-20 00:39:06 · 204 阅读 · 0 评论 -
[LeetCode]Self Dividing Numbers@Python
Self Dividing Numbers A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0....原创 2019-04-22 21:43:31 · 113 阅读 · 0 评论 -
[LeetCode] N-Repeated Element in Size 2N Array@Python
** 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. Return the element repeated N times. Example ...原创 2019-04-17 14:34:14 · 106 阅读 · 0 评论 -
Intersection of Two Arrays II
Intersection of Two Arrays II Given two arrays, write a function to compute their intersection. Example Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Solution class Solution: def inter...原创 2019-03-27 15:46:28 · 181 阅读 · 0 评论 -
Repeated DNA Sequences
Repeated DNA Sequences All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, it is sometimes useful to identify repeated sequence...原创 2019-03-22 10:48:06 · 122 阅读 · 0 评论 -
Isomorphic Strings
Isomorphic Strings Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be repl...原创 2019-03-25 16:25:37 · 81 阅读 · 0 评论