Giter VIP home page Giter VIP logo

discussing-algorithm's Introduction

Hello, I am thinking something about what to do...

discussing-algorithm's People

Contributors

weisclpm avatar zakanun avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

weisclpm

discussing-algorithm's Issues

代码放得比较简陋,点击链接去到的地方,通过题目来搜索就可以定位到对应的代码块

2021.03.17

遍历二叉树最基本的三种方式:144.前序遍历94.中序遍历145.后序遍历

三种遍历的差别在与先拿到哪个节点,这在代码中能清晰得知(从前一直区分不了这三种遍历,想了一下原因在于当年不知道咋的总结出来的口诀,是错的.....若是通过代码记忆,效果应该会好一些)

public void binTreeTraversal(TreeNode treeNode) {
    if (treeNode == null) {
        return;
    }

    // 前序遍历拿值
    binTreeTraversal(treeNode.getLeft())
    // 中序遍历拿值
    binTreeTraversal(treeNode.getRight())
    // 后序遍历拿值
}

先将基本的遍历方式记住,然后再实践其他树的题目。代码链接

2021.09

2021.09.01

165. 比较版本号
能够想出来的方法就是以 . 为分隔符对两个版本号字符串进行划分(注意在 Java 中调用 split 时,. 需要使用 \. 进行转义)遍历拿到切割后的字符串数组,分别比较对应下标的数字的大小,直至结束。

题解中还提供了一种将空间复杂度将为常量的方式,就是巧妙的获取 . 之前的数进行比较,具体在代码中也有体现。

代码链接

每日一题

记录一下每日一题(为了拿到力扣全家桶周边(^^))

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.