摘要:
求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C) class Solution: def Sum_Solution(self, n): # write code here return sum(list(ra 阅读全文
posted @ 2019-10-21 17:01
天马流欣
阅读(99)
评论(0)
推荐(0)
摘要:
操作给定的二叉树,将其变换为源二叉树的镜像 public class Solution { public void Mirror(TreeNode root) { if( root == null){ return; } if( root.left == null && root.right == 阅读全文
posted @ 2019-10-21 16:50
天马流欣
阅读(112)
评论(0)
推荐(0)
摘要:
输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下4 X 4矩阵: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10. import java.ut 阅读全文
posted @ 2019-10-21 15:20
天马流欣
阅读(158)
评论(0)
推荐(0)

浙公网安备 33010602011771号