Giter VIP home page Giter VIP logo

fucking-leedcode's Introduction

fucking-leedcode

Let's make a fucking leedcode team~

fucking-leedcode's People

Contributors

zuojiahaopulin avatar rhapsody1290 avatar wumengfei avatar cw116 avatar tangqixiang avatar

Stargazers

 avatar

Watchers

James Cloos avatar

fucking-leedcode's Issues

@曹老师,LCA的问题

1、这个是搜索二叉树还是普通二叉树
2、为啥没有条件判断呀
3、如果节点1在root左子树上,节点2在root右子树上,貌似代码判断不出来呀,代码AC了么?

原理是不是这个?

1 如果两个节点都比当前节点小, 那公共祖先必然是当前节点的左子树上, 所以递归左子树;
2 如果两个节点都比当前节点大, 那么同上, 递归右子树;
3 如果两个节点有一个为当前节点, 则当前节点为公共节点; 如果两个节点分别比当前节点小和大, 那么当前节点必为公共节点.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.