02 2018 档案
摘要:S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per
阅读全文
摘要:X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. A number is valid if each
阅读全文
摘要:Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa
阅读全文
摘要:We have some permutation A of [0, 1, ..., N - 1], where N is the length of A. The number of (global) inversions is the number of i < j with 0 <= i < j
阅读全文
摘要:On the first row, we write a 0. Now in every subsequent row, we look at the previous row and replace each occurrence of 0 with 01, and each occurrence
阅读全文