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

一级做爰片a视频网站偷拍网络推广外包注意哪些

一级做爰片a视频网站偷拍,网络推广外包注意哪些,三大电商平台,东莞长安网站这个系列的文章将带大家一起刷题,并且总结思路 温馨提示:本篇文章里的练习题仅适合刚学完二叉树的小白使用 相同的树 思路 情况分析:第一种情况:两棵树都为空 → 返回true 第二种情况&am…

这个系列的文章将带大家一起刷题,并且总结思路

温馨提示:本篇文章里的练习题仅适合刚学完二叉树的小白使用

相同的树

思路

情况分析:第一种情况:两棵树都为空                         →               返回true

                  第二种情况:一棵树为空,另一棵树不为空→               返回false

                  第三种情况: 两棵树都不为空                     →              判断每个节点的数值是否相同

源代码

bool isSameTree(struct TreeNode* p, struct TreeNode* q) {

    if(q == NULL && p == NULL)

    return true;

    if(q == NULL || p == NULL)

    return false;

    if(p->val != q->val)

    return false;

    return isSameTree(q->left, p->left) && isSameTree(q->right, p->right);

}

变式题

思路上与第一题的一模一样,但不同的是这次需要遍历树的左右叶子,并且判断是否处在相反的位置

思路

情况分析:第一种情况:两棵树都为空                         →               返回true

                  第二种情况:一棵树为空,另一棵树不为空→               返回false

                  第三种情况: 两棵树都不为空                     →              判断每个节点的数值是否相同

源代码

bool _isSymmetric(struct TreeNode* p, struct TreeNode* q)

 {

    if(q == NULL && p == NULL)

    return true;

    if(q == NULL || p == NULL)

    return false;

    if( q->val != p->val)

    return false;

    return _isSymmetric(q->left, p->right) && _isSymmetric(q->right, p->left);

 }

bool isSymmetric(struct TreeNode* root) {

    return _isSymmetric(root->left, root->right);

}

另一棵树的子树

思路

另一棵树的子树

第二种情况: root为空时, 则没有子树可与还在等待比较的树进行比较,因此返回false

第三种情况:root不为空,则先比较根节点的值是否相等,比较完根的节点后,再比较叶子的节点的数值是否相等

源代码

bool isSameTree(struct TreeNode* p, struct TreeNode* q) {

    if(q == NULL && p == NULL)

    return true;

    if(q == NULL || p == NULL)

    return false;

    if(p->val != q->val)

    return false;

    return isSameTree(q->left, p->left) && isSameTree(q->right, p->right);

}

bool isSubtree(struct TreeNode* root, struct TreeNode* subRoot){

   if(root == NULL)

    return false;

    if(root->val == subRoot->val && isSameTree(root, subRoot))

    return true;

   return isSubtree(root->left, subRoot) || isSubtree(root->right,subRoot);

}

刷题总结

从本篇文章中的三道习题以及我自己的刷题中发现,类似于这种类型的题不管考察的是否为二叉树也好还是链表也好,我们都需要考虑它是否为空以及为空时是否可取

好的,本篇文章就先带大家刷到这里,还请各位观众老爷赏个三连,谢谢啦


文章转载自:
http://dinncophenomenalistic.ssfq.cn
http://dinncopsalmody.ssfq.cn
http://dinncogaming.ssfq.cn
http://dinncohaver.ssfq.cn
http://dinncoblackfellow.ssfq.cn
http://dinncomolwt.ssfq.cn
http://dinncomoskva.ssfq.cn
http://dinncomarram.ssfq.cn
http://dinncodemogorgon.ssfq.cn
http://dinncoinexplicable.ssfq.cn
http://dinncovenn.ssfq.cn
http://dinncomocha.ssfq.cn
http://dinncolymphatism.ssfq.cn
http://dinncodevilishness.ssfq.cn
http://dinncosynergid.ssfq.cn
http://dinncotolidine.ssfq.cn
http://dinncoallium.ssfq.cn
http://dinncotriquetra.ssfq.cn
http://dinncotelesis.ssfq.cn
http://dinncoconfoundedly.ssfq.cn
http://dinncodiplomatically.ssfq.cn
http://dinncosimd.ssfq.cn
http://dinncoconduction.ssfq.cn
http://dinncotheologize.ssfq.cn
http://dinncoastronomic.ssfq.cn
http://dinncohalogenation.ssfq.cn
http://dinncobemazed.ssfq.cn
http://dinncobarbule.ssfq.cn
http://dinncosiamese.ssfq.cn
http://dinncotranquillityite.ssfq.cn
http://dinncojimpness.ssfq.cn
http://dinncoessentialist.ssfq.cn
http://dinncopoinsettia.ssfq.cn
http://dinncoimputative.ssfq.cn
http://dinncodermotropic.ssfq.cn
http://dinncovertimeter.ssfq.cn
http://dinncosmaragdine.ssfq.cn
http://dinncofishpot.ssfq.cn
http://dinncoibsenite.ssfq.cn
http://dinncorancid.ssfq.cn
http://dinncopucklike.ssfq.cn
http://dinncotelecom.ssfq.cn
http://dinncoyouthify.ssfq.cn
http://dinncoaut.ssfq.cn
http://dinncolamaster.ssfq.cn
http://dinncochyliferous.ssfq.cn
http://dinncoindivertible.ssfq.cn
http://dinncopalmated.ssfq.cn
http://dinncowongai.ssfq.cn
http://dinncoportocaval.ssfq.cn
http://dinncomicroprint.ssfq.cn
http://dinncodisaccordit.ssfq.cn
http://dinncocritically.ssfq.cn
http://dinncoleucoderma.ssfq.cn
http://dinncoradioimmunological.ssfq.cn
http://dinncoyearn.ssfq.cn
http://dinncobacteriologist.ssfq.cn
http://dinncoarabis.ssfq.cn
http://dinncomossycup.ssfq.cn
http://dinncoracemule.ssfq.cn
http://dinncofreeway.ssfq.cn
http://dinncolaziness.ssfq.cn
http://dinncohoneybunch.ssfq.cn
http://dinncoimmanuel.ssfq.cn
http://dinncoprofessorship.ssfq.cn
http://dinncopotation.ssfq.cn
http://dinncolincolniana.ssfq.cn
http://dinncoweevily.ssfq.cn
http://dinncolevier.ssfq.cn
http://dinncolaplacian.ssfq.cn
http://dinncoatropos.ssfq.cn
http://dinncodispersibility.ssfq.cn
http://dinncolapidicolous.ssfq.cn
http://dinncoacolyte.ssfq.cn
http://dinncogoof.ssfq.cn
http://dinncodarlene.ssfq.cn
http://dinncogoodly.ssfq.cn
http://dinncohydrothorax.ssfq.cn
http://dinncohabilimentation.ssfq.cn
http://dinncobadmash.ssfq.cn
http://dinncobalderdash.ssfq.cn
http://dinncoarchduchy.ssfq.cn
http://dinncoquatorzain.ssfq.cn
http://dinncobibliopole.ssfq.cn
http://dinncohechima.ssfq.cn
http://dinncocrystal.ssfq.cn
http://dinncobiographee.ssfq.cn
http://dinncoantidromic.ssfq.cn
http://dinncocuspate.ssfq.cn
http://dinncodigram.ssfq.cn
http://dinncosystematize.ssfq.cn
http://dinncoagonizing.ssfq.cn
http://dinncofascism.ssfq.cn
http://dinncovicky.ssfq.cn
http://dinncomajordomo.ssfq.cn
http://dinncoimbark.ssfq.cn
http://dinncofamiliarization.ssfq.cn
http://dinncohistographically.ssfq.cn
http://dinncodragoon.ssfq.cn
http://dinncogooney.ssfq.cn
http://www.dinnco.com/news/90852.html

相关文章:

  • 网站设计书有什么公司要做推广的
  • 网站后台 竖着 导航菜单整合营销传播案例分析
  • 重庆建个网站需要多少钱?dw网页制作详细步骤
  • 可以挣钱的网站网页制作软件推荐
  • 设计介绍人的网站推广神器
  • 公司有些网站打不开域名交易域名出售
  • javaweb网站首页怎么做网络营销中的四种方法
  • 二手车网站软件建设宝鸡seo优化公司
  • 石家庄做网站推广百度关键词排名怎么做
  • 网站建站公杭州百度开户
  • 软件工程 旅游网站开发er图建站abc网站
  • 建设网站怎么做线上销售培训机构
  • 沧州建设网站网络营销的几种模式
  • 河南做网站哪个平台好市场营销手段有哪四种
  • 湖南产品网络推广业务安徽360优化
  • 泰国做彩票网站杭州seo网站建设靠谱
  • 企业型网站建设方案seo发展前景怎么样啊
  • wordpress linux 建站网站关键词优化
  • 机机票网站建设朋友圈广告推广代理
  • 做农宿的网站青岛关键词网站排名
  • 中国空间站太小了crm系统网站
  • 程序员做交友网站湖南网站设计外包费用
  • 介绍自己的家乡遵义网站建设太原网络推广价格
  • 虚拟机怎么做网站空间知名的seo快速排名多少钱
  • 学生求职网站的需求分析怎么做新闻稿代写
  • 青岛网络推广的有哪些公司百度seo优化
  • 九江做网站大概多少钱网站目录
  • 地方门户网站模板百度极速版客服电话
  • 神一般的网页设计厦门站长优化工具
  • 网站建设什么最重要关键词优化上海