摘要:
题目如下: Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land) A move consists of walking from one land square 4-directionally t 阅读全文
摘要:
题目如下: We are given a linked list with head as the first node. Let's number the nodes in the list: node_1, node_2, node_3, ... etc. Each node may have 阅读全文
摘要:
题目如下: Given a number N, return a string consisting of "0"s and "1"s that represents its value in base -2 (negative two). The returned string must have 阅读全文
摘要:
题目如下: Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (from most-significant-bit to le 阅读全文
摘要:
题目如下: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null 阅读全文