摘要:
/** * Given an integer n, generate a square matrix filled with elements from 1 to n 2 in spiral order. * For example, * Given n =3, * You should return the following matrix: * [ * [ 1, 2, 3 ], * [ 8, 阅读全文
posted @ 2019-08-12 10:49
gentleKay
阅读(140)
评论(0)
推荐(0)
摘要:
/** * Follow up for problem "Populating Next Right Pointers in Each Node". * What if the given tree could be any binary tree? Would your previous solution still work? * Note: * You may only use consta 阅读全文
posted @ 2019-08-12 10:48
gentleKay
阅读(125)
评论(0)
推荐(0)
摘要:
/** * Suppose a sorted array is rotated at some pivot unknown to you beforehand. * (i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2). * You are given a target value to search. If found in the array return 阅读全文
posted @ 2019-08-12 10:47
gentleKay
阅读(165)
评论(0)
推荐(0)

浙公网安备 33010602011771号