摘要:
Description: For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or more times) Return the largest 阅读全文
摘要:
Description: Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimiz 阅读全文
摘要:
Description: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return tru 阅读全文
摘要:
Description: A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like t 阅读全文
摘要:
Description: Given a date, return the corresponding day of the week for that date. The input is given as three integers representing the day, month an 阅读全文
摘要:
Description: Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, r 阅读全文
摘要:
Description: A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pairs of neighboring stops where distance 阅读全文
摘要:
Description: Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums. Formally, 阅读全文
摘要:
Description: A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and 阅读全文
摘要:
Description: We have an array A of integers, and an array queries of queries. For the i-th query val = queries[i][0], index = queries[i][1], we add va 阅读全文