Code Monkey home page Code Monkey logo

leetcode's Introduction

leetcode

20191120 26. 删除排序数组中的重复项 RemoveDuplicatesFromSortedArray 283. 移动0 MoveZeroes 20191121 189. 旋转数组 RotateArray 20191122 21. 合并两个有序链表 MergeTwoSortedList 20191123 88. 合并两个有序数组 MergeSortedArray

1120学习总结 移动0这道题之前已经刷过了,类似的时间复杂度O(n)的原地算法几乎都是通过双指针解决的,类似的还有:26删除重复项,27移除元素 1121学习总结 旋转数组这道题,可以通过三种方法:暴力,环状替换,反转。最开始只想到了暴力,学习了题解以后学到一个反转数组的小技巧:双指针, 双指针在数组中是高频出现的技巧(自己写是通过对半反转的,需要多考虑很多),最后,环状替换要注意和元素交换不一样,会多使用一个临时空间。 1122学习总结 合并有序列表,两种解法分别是递归和循环,两种解法都是O(m+n)。 1123学习总结 今天通过视频题解学习了盛水最多的容器,三数之和加深了对双指针的理解,双指针使用的前提是有序。

leetcode's People

Watchers

 avatar  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.