自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 Leecode 124. 二叉树中的最大路径和

Leecode 124. 二叉树中的最大路径和路径 被定义为一条从树中任意节点出发,沿父节点-子节点连接,达到任意节点的序列。同一个节点在一条路径序列中 至多出现一次 。该路径 至少包含一个 节点,且不一定经过根节点。路径和 是路径中各节点值的总和。给你一个二叉树的根节点 root ,返回其 最大路径和 。示例 1:输入:root = [1,2,3]输出:6解释:最优路径是 2 -> 1 -> 3 ,路径和为 2 + 1 + 3 = 6示例 2:输入:root = [-1

2022-03-13 22:45:31 94

原创 ajax实现前后端传输流文件(图片)

ajax实现前后端传输流文件(图片)在参考了一众CSDN大神的帖子之后终于实现了从后端获取图片并正确显示在canvas中,下面是代码 var xmlhttp; xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","自己的函数地址",true); xmlhttp.responseType = "blob"; xmlhttp.onload = function(){ console.log(this);

2022-01-13 16:52:27 1513 1

原创 PAT真题1174 Left-View of Binary Tree (25分)

1174 Left-View of Binary Tree (25分)The left-view of a binary tree is a list of nodes obtained by looking at the tree from left hand side and from top down. For example, given a tree shown by the figure, its left-view is { 1, 2, 3, 4, 5 }Given the inorder

2021-09-10 15:44:05 249

原创 PAT 甲级1166(图)Summit (25分)

A summit (峰会) is a meeting of heads of state or government. Arranging the rest areas for the summit is not a simple job. The ideal arrangement of one area is to invite those heads so that everyone is a direct friend of everyone.Now given a set of tentativ

2021-09-07 21:21:09 254

原创 PAT甲级 A1103 Integer Factorization (30 分)

1103 Integer Factorization (30 分)The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P factorization of N for any positive integers N, K and P.

2021-08-28 15:14:36 138

原创 PAT甲级 1043 Is It a Binary Search Tree (25 分)

PAT甲级10431043 Is It a Binary Search Tree (25 分)题目输入输出代码1043 Is It a Binary Search Tree (25 分)题目A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with key

2021-08-12 14:52:36 68

原创 中国大学MOOC-陈越、何钦铭-数据结构-起步能力自测题

中国大学MOOC-陈越、何钦铭-数据结构-起步能力自测题自测-1 打印沙漏自测-2 素数对猜想自测-3数组元素循环右移问题自测-4Have Fun with Numbers自测-5Shuffling Machine自测-1 打印沙漏本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。给定任意N个符号,不一定能正好组成一

2021-01-04 20:55:02 294

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除