摘要:
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
摘要:
We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance 阅读全文
摘要:
Given a 2D grid of 0s and 1s, return the number of elements in the largest square subgrid that has all 1s on its border, or 0 if such a subgrid doesn' 阅读全文
摘要:
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
摘要:
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 only 1s. 阅读全文
摘要:
In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permu 阅读全文
摘要:
Given a 01 matrix, find the longest line of consecutive 1 in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Example 1: 阅读全文
摘要:
Google Calendar, Outlook, iCal has been banned from your company! So an intrepid engineer has decided to roll their own implementation. Unfortunately 阅读全文
摘要:
Implement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializes an array-like data structure with the given len 阅读全文