(分形作业) 取一矩形,九等分而去其中. 每一份九等分去其中:循环往复. 方法一(传统方法) 将每个矩形映射到三个矩形中去即可. def big(a,times): k=3**times b=np.zeros((k,k),dtype=int) for i in range(k//3): for j in range(k//3): t=ct.renew(a[i][j]) b[3*i:3*i+3,3*j:3*j+…
题目链接:Path Sum II | LeetCode OJ Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ / \ 7 2 5 1 return [ [5,4,11,2],…