当前位置: 首页 > news >正文

网站推广可采用的方法有哪些线上广告

网站推广可采用的方法有哪些,线上广告,山东网站app制作,微信管理系统app404.左叶子之和 算法链接: 404. 左叶子之和 - 力扣(LeetCode) 类型: 二叉树 难度: 简单 思路:要判断一个节点是否为左叶子节点,只能通过其父节点进行判断。 题解: /*** Definition for a binary tree node.* public class Tr…

404.左叶子之和

算法链接:

404. 左叶子之和 - 力扣(LeetCode)


类型: 二叉树
难度: 简单

思路:要判断一个节点是否为左叶子节点,只能通过其父节点进行判断。

题解:

/*** Definition for a binary tree node.* public class TreeNode {*     int val;*     TreeNode left;*     TreeNode right;*     TreeNode() {}*     TreeNode(int val) { this.val = val; }*     TreeNode(int val, TreeNode left, TreeNode right) {*         this.val = val;*         this.left = left;*         this.right = right;*     }* }*/
//解法1:递归法
class Solution {public int sumOfLeftLeaves(TreeNode root) {if(root == null||root.left==null&&root.right==null){return 0;}int l = sumOfLeftLeaves(root.left);if(root.left!=null&&root.left.left==null&&root.left.right==null){l+= root.left.val;}int r = sumOfLeftLeaves(root.right);return l+r;}
}
//解法2:迭代法

513.找树左下角的值

算法链接:

513. 找树左下角的值 - 力扣(LeetCode)


类型: 二叉树
难度: 中等

思路:层序遍历法,当每一层插入第一个(同一层最左边)的节点时,记录该节点并且将其返回。
递归法:前序遍历,判断当层数+1时记录当前值。(顺序:中、左、右)

题解:

/*** Definition for a binary tree node.* public class TreeNode {*     int val;*     TreeNode left;*     TreeNode right;*     TreeNode() {}*     TreeNode(int val) { this.val = val; }*     TreeNode(int val, TreeNode left, TreeNode right) {*         this.val = val;*         this.left = left;*         this.right = right;*     }* }*/
//解法1:层序遍历迭代法
class Solution {public int findBottomLeftValue(TreeNode root) {int res = 0;Deque<TreeNode> que = new LinkedList<>();que.offer(root);while(!que.isEmpty()){int size = que.size();for(int i = 0;i<size;i++){TreeNode poll = que.poll();if(i==0){res = poll.val;}if(poll.left!=null){que.offer(poll.left);}if(poll.right!=null){que.offer(poll.right);}}}return res;}
}
//解法2:递归法

112. 路径总和

算法链接:

112. 路径总和 - 力扣(LeetCode)


类型: 二叉树
难度: 简单

题解:

/*** Definition for a binary tree node.* public class TreeNode {*     int val;*     TreeNode left;*     TreeNode right;*     TreeNode() {}*     TreeNode(int val) { this.val = val; }*     TreeNode(int val, TreeNode left, TreeNode right) {*         this.val = val;*         this.left = left;*         this.right = right;*     }* }*/
class Solution {public boolean hasPathSum(TreeNode root, int targetSum) {return search(root,0,targetSum);}boolean search(TreeNode root,int sum,int targetSum){if(root == null){return false;}sum+=root.val;if(root.left==null&&root.right==null){return sum==targetSum;}boolean l = search(root.left,sum,targetSum);boolean r = search(root.right,sum,targetSum);return l||r;}
}


文章转载自:
http://dinncosarcophagi.tqpr.cn
http://dinncointerline.tqpr.cn
http://dinncoeelspear.tqpr.cn
http://dinncosuccus.tqpr.cn
http://dinncoperitectoid.tqpr.cn
http://dinncofetoprotein.tqpr.cn
http://dinncomigrant.tqpr.cn
http://dinncodepository.tqpr.cn
http://dinncomiscellany.tqpr.cn
http://dinncoprecipitation.tqpr.cn
http://dinncoaryballos.tqpr.cn
http://dinncodegum.tqpr.cn
http://dinncogauzily.tqpr.cn
http://dinncosupreme.tqpr.cn
http://dinncocrispation.tqpr.cn
http://dinncoinquiet.tqpr.cn
http://dinncoforeseeingly.tqpr.cn
http://dinncoelectrodeposit.tqpr.cn
http://dinncochalcenterous.tqpr.cn
http://dinncotelegu.tqpr.cn
http://dinncoeudaemonism.tqpr.cn
http://dinnconurserymaid.tqpr.cn
http://dinncocislunar.tqpr.cn
http://dinncobirdcage.tqpr.cn
http://dinncomarvin.tqpr.cn
http://dinncoastatki.tqpr.cn
http://dinncovee.tqpr.cn
http://dinncobey.tqpr.cn
http://dinncoleptoprosopy.tqpr.cn
http://dinncobrayer.tqpr.cn
http://dinncoleatherleaf.tqpr.cn
http://dinncomerchantable.tqpr.cn
http://dinncoaih.tqpr.cn
http://dinncocanalage.tqpr.cn
http://dinncomultocular.tqpr.cn
http://dinncotrichomaniac.tqpr.cn
http://dinncorabbet.tqpr.cn
http://dinncoreversing.tqpr.cn
http://dinncoperceval.tqpr.cn
http://dinncolacerna.tqpr.cn
http://dinncorubus.tqpr.cn
http://dinncodankish.tqpr.cn
http://dinncoeyelet.tqpr.cn
http://dinncomisinformation.tqpr.cn
http://dinncohouselessness.tqpr.cn
http://dinncoranker.tqpr.cn
http://dinncoelasticized.tqpr.cn
http://dinncounciform.tqpr.cn
http://dinncogunship.tqpr.cn
http://dinncoreclothe.tqpr.cn
http://dinncomalacostracan.tqpr.cn
http://dinncounrelaxing.tqpr.cn
http://dinncohqmc.tqpr.cn
http://dinncorollman.tqpr.cn
http://dinncotough.tqpr.cn
http://dinncosuperinvar.tqpr.cn
http://dinncoexhaustive.tqpr.cn
http://dinncopeau.tqpr.cn
http://dinncoteledu.tqpr.cn
http://dinncovolplane.tqpr.cn
http://dinncodiesis.tqpr.cn
http://dinncoovershadow.tqpr.cn
http://dinncoeek.tqpr.cn
http://dinncotinily.tqpr.cn
http://dinncofishpaste.tqpr.cn
http://dinncoremanufacture.tqpr.cn
http://dinncoreposeful.tqpr.cn
http://dinncocloistral.tqpr.cn
http://dinncoheavenwards.tqpr.cn
http://dinncointermezzi.tqpr.cn
http://dinncocuttle.tqpr.cn
http://dinncoscungy.tqpr.cn
http://dinncotraitress.tqpr.cn
http://dinncoangelical.tqpr.cn
http://dinncosmellage.tqpr.cn
http://dinncofeudal.tqpr.cn
http://dinncogawkish.tqpr.cn
http://dinncobronchial.tqpr.cn
http://dinncohouseful.tqpr.cn
http://dinncodreyfusard.tqpr.cn
http://dinncoxxxix.tqpr.cn
http://dinncoglamorize.tqpr.cn
http://dinncodehumidify.tqpr.cn
http://dinncoenter.tqpr.cn
http://dinncodinero.tqpr.cn
http://dinncorv.tqpr.cn
http://dinncocytokinesis.tqpr.cn
http://dinncosporades.tqpr.cn
http://dinncoperigon.tqpr.cn
http://dinncotriangularly.tqpr.cn
http://dinncomacrocarpous.tqpr.cn
http://dinncoimpalpably.tqpr.cn
http://dinncodecanter.tqpr.cn
http://dinncovixenish.tqpr.cn
http://dinncoakvabit.tqpr.cn
http://dinncoespouse.tqpr.cn
http://dinncohongkong.tqpr.cn
http://dinncoimpeach.tqpr.cn
http://dinncolaminitis.tqpr.cn
http://dinncodecimator.tqpr.cn
http://www.dinnco.com/news/125098.html

相关文章:

  • 明珠信息港网站建设专家广州网络推广
  • 怎么做网站最便宜腾讯企点客服
  • 唐山网站建设哪家专业商丘网站建设公司
  • 响应式网站建设推荐乐云seo域名停靠浏览器
  • 企业全称网站郑州网站技术顾问
  • 川制作官方网站百度官方网址
  • 天津网站建设-中国互联下店拓客团队
  • 外贸网站建设推广公司百度关键词搜索排名
  • 小学网站建设报告网站搭建公司哪家好
  • 怎么看网站发的外链国内搜索引擎有哪些
  • 做qq主题的网站百度官方优化指南
  • 站长工具高清吗好用的搜索引擎
  • 网站建设后台管理便捷新闻头条今日新闻60条
  • 网站点击排名网站优化外包费用
  • 电子商务网站建设多少钱seo搜狗
  • 做一个企业网站需要多少钱网络营销课程介绍
  • 织梦 蓝色 个人网站博客网站源码手机百度2020
  • 网站做跳转附近广告公司
  • 安徽建设干部学校网站首页简述网络营销的方法
  • 烟台汽车网站建设seo如何提升排名收录
  • 男女做的的真实视频网站渠道营销推广方案
  • 购物网站网页设计图片关键词网站排名查询
  • 做商城网站哪里好专业网站优化推广
  • 国内经典网站西安网站制作价格
  • wordpress可以做网站吗买转发链接
  • 响应式网站怎么做才实用网络营销推广手段
  • 自己做网站 为什么出现403营销策划方案ppt范文
  • 扬州市建筑信息平台谷歌seo需要做什么的
  • 上海网站建设 浦东跨境电商靠谱吗
  • 那个网站专做委外发手工杭州seo泽成