摘要:
就是找一个由1组成的边界 暴力解决 找到这个边框 算出一个由多少个数 下面解法真的妙 class Solution { public int largest1BorderedSquare(int[][] grid) { int ans = 0; int n = grid.length; int m 阅读全文
摘要:
曼哈顿距离 class Solution { public String alphabetBoardPath(String target) { int x = 0, y = 0, nx = 0, ny = 0; StringBuffer ans = new StringBuffer(""); for 阅读全文
摘要:
class Solution { public int tribonacci(int n) { int T0 = 0; int T1 = 1; int T2 = 1; int arr[] = new int [40]; arr[0] = 0; arr[1] = 1; arr[2] = 1; for( 阅读全文