摘要: 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 only if the matrix is Toeplitz.Example 1:Input: matrix = [[1,2,3... 阅读全文
posted @ 2018-01-22 23:26 xiejunzhao 阅读(201) 评论(0) 推荐(0)
摘要: Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231.Find the maximum result of ai XOR aj, where 0 ≤ i, j < n.Could you do this in O(n) runtime?Example:Input: [3, 10, 5, 25, 2,... 阅读全文
posted @ 2018-01-22 23:26 xiejunzhao 阅读(161) 评论(0) 推荐(0)