Code Monkey home page Code Monkey logo

leetcode's Introduction

力扣笔记

1.常用数据结构

1.1 栈

  • 包含min函数的栈-M

力扣155
解法:辅助栈
代码跳转

1.2 队列

  • 包含max函数的队列

解法:辅助队列 代码跳转

  • 用两个栈实现队列

解法:利用栈特性 代码跳转

1.3 链表

  • 反转链表-E

力扣206
常用解法:栈、递归、循环
如链表 1->3->2->5->7->8->11
代码跳转

  • 从尾到头打印链表

常用解法:递归回溯、辅助栈
如链表 1->3->2->5->7->8->11
代码跳转

  • 复杂链表的复制-M

力扣138
解法:哈希表
使用Hash表存新旧节点,然后根据纠结点调整新节点的指针
代码跳转

1.4 树

2.自动机

  • 表示数值的字符串-H

解法:有限状态自动机
请实现一个函数用来判断字符串是否表示数值(包括整数和小数)
空格、数字0-9、正负号、小数点、幂符号e E
代码跳转

3.滑动窗口

  • 滑动窗口的最大值-H

力扣59
解法:暴力循环、辅助优先队列
nums = [1,3,-1,-3,5,3,6,7], 和 k = 3 输出: [3,3,5,5,6,7]
代码跳转

4.动态规划

5.热题

leetcode's People

Contributors

shanyuguangyun avatar

Watchers

 avatar

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.