04 2019 档案
摘要:We are given two arrays A and B of words. Each word is a string of lowercase letters. Now, say that word b is a subset of word a if every letter in b
阅读全文
摘要:A string S of lowercase letters is given. Then, we may make any number of moves. In each move, we choose one of the first K letters (starting from the
阅读全文
摘要:Given a balanced parentheses string S, compute the score of the string based on the following rule: () has score 1 AB has score A + B, where A and B a
阅读全文
摘要:To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily the same size). Each repla
阅读全文
摘要:We had some 2-dimensional coordinates, like "(1, 3)" or "(2, 0.5)". Then, we removed all commas, decimal points, and spaces, and ended up with the str
阅读全文
摘要:Given an expression such as expression = "e + 8 - a + 5" and an evaluation map such as {"e": 1} (given in terms of evalvars = ["e"] and evalints = [1]
阅读全文
摘要:X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate
阅读全文
摘要:Special binary strings are binary strings with the following two properties: The number of 0's is equal to the number of 1's. Every prefix of the bina
阅读全文
摘要:You are given a string expression representing a Lisp-like expression to return the integer value of. The syntax for these expressions is given as fol
阅读全文
摘要:Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th
阅读全文
摘要:Given a string representing a code snippet, you need to implement a tag validator to parse the code and return whether it is valid. A code snippet is
阅读全文
摘要:Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one cha
阅读全文
摘要:Given an integer n, find the closest integer (not including itself), which is a palindrome. The 'closest' is defined as absolute difference minimized
阅读全文
摘要:Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is gre
阅读全文
摘要: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
阅读全文
摘要:Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4. However, you can add any
阅读全文
摘要:1. Absence to love is what wind is to fire. It extinguishes the small; It inflames the great. 2. It is a truth universally acknowledged that a single
阅读全文
摘要:Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subs
阅读全文
摘要:Given a nested list of integers represented as a string, implement a parser to deserialize it. Each element is either an integer, or a list -- whose e
阅读全文
摘要:来源:HACK学习呀 2015cracer入侵入门到精通视频教程 点我查看 trf3 一笔√带过入侵教程 点我查看 ypan 〔复仇者〕新手入门系列(7套) 点我查看 g1tb 菜鸟入门,做的确实不错 点我查看 q0oh 菜鸟基础(10套) 点我查看 2zq6 小迪渗透第十期 点我查看 u5sv 计
阅读全文
摘要:第一个、 打开txt文件,复制以下代码粘贴进去(可以修改中文部分,其它代码不要动!)。保存并关闭txt文件。 msgbox("做我女朋友好吗?") msgbox("房产证上写你名字") msgbox("保大") msgbox("我妈会游泳") 然后把文件后缀名改成.vbs,这是最基本的,没有逻辑。
阅读全文
摘要:Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. Example 1: Input: 123 Output: "
阅读全文
摘要:Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators a
阅读全文
摘要:Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f
阅读全文
摘要:The key of Kmp is to build a look up table that records the match result of prefix and postfix. Value in the table means the max len of matching subst
阅读全文
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, w
阅读全文
摘要: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
阅读全文
摘要:In a row of dominoes, A[i] and B[i] represent the top and bottom halves of the i-th domino. (A domino is a tile with two numbers from 1 to 6 - one on
阅读全文
摘要:Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including d
阅读全文
摘要:Given an array A of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by K. Example 1: Note: Approach #1: Has
阅读全文
摘要:A string of '0's and '1's is monotone increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0.
阅读全文
摘要:Given a circular array C of integers represented by A, find the maximum possible sum of a non-empty subarray of C. Here, a circular array means the en
阅读全文
摘要:In a deck of cards, each card has an integer written on it. Return true if and only if you can choose X >= 2 such that it is possible to split the ent
阅读全文
摘要:Given an array of integers A, find the sum of min(B), where B ranges over every (contiguous) subarray of A. Since the answer may be large, return the
阅读全文
摘要:Write an iterator that iterates through a run-length encoded sequence. The iterator is initialized by RLEIterator(int[] A), where A is a run-length en
阅读全文
摘要:Given an array of integers A, consider all non-empty subsequences of A. For any sequence S, let the width of S be the difference between the maximum a
阅读全文
摘要:Two images A and B are given, represented as binary, square matrices of the same size. (A binary matrix has only 0s and 1s as values.) We translate on
阅读全文
摘要:1021. Remove Outermost Parentheses A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strin
阅读全文
摘要:Given string S and a dictionary of words words, find the number of words[i] that is a subsequence of S. Note: All words in words and S will only consi
阅读全文
摘要:An N x N board contains only 0s and 1s. In each move, you can swap any 2 rows with each other, or any 2 columns with each other. What is the minimum n
阅读全文
摘要: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
阅读全文
摘要:This question is the same as "Max Chunks to Make Sorted" except the integers of the given array are not necessarily distinct, the input array could be
阅读全文
摘要:Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into some number of "chunks" (partitions), and individuall
阅读全文
摘要:Your are given an array of positive integers nums. Count and print the number of (contiguous) subarrays where the product of all the elements in the s
阅读全文
摘要:Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t
阅读全文
摘要:Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get.
阅读全文
摘要:Given two integers n and k, you need to construct a list which contains n different positive integers ranging from 1 to n and obeys the following requ
阅读全文
摘要:Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave
阅读全文
摘要:Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be
阅读全文
摘要:Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: The len
阅读全文
摘要:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi
阅读全文

浙公网安备 33010602011771号