摘要:
题目如下: You are given the number of rows n_rows and number of columns n_cols of a 2D binary matrix where all values are initially 0. Write a function fl 阅读全文
摘要:
题目如下: In an array A containing only 0s and 1s, a K-bit flip consists of choosing a (contiguous) subarray of length K and simultaneously changing every 阅读全文
摘要:
题目如下: On a N x N grid of cells, each cell (x, y) with 0 <= x < N and 0 <= y < N has a lamp. Initially, some number of lamps are on. lamps[i] tells us 阅读全文
摘要:
题目如下: 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 (inclu 阅读全文
摘要:
题目如下: We are given that the string "abc" is valid. From any valid string V, we may split V into two pieces X and Y such that X + Y (X concatenated wit 阅读全文
摘要:
题目如下: Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains on 阅读全文
摘要:
题目如下: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you ha 阅读全文
摘要:
题目如下: Given an array A of non-negative integers, the array is squareful if for every pair of adjacent elements, their sum is a perfect square. Return 阅读全文
摘要:
题目如下: We are stacking blocks to form a pyramid. Each block has a color which is a one letter string, like `'Z'`. For every block of color `C` we place 阅读全文
摘要:
题目如下: Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children resp 阅读全文