GithubHelp home page GithubHelp logo

leetcode-pp / leetcode-pp Goto Github PK

View Code? Open in Web Editor NEW
24.0 5.0 6.0 151.25 MB

《力扣加加》官方网站,力扣加加是一个专注于算法知识分享的平台,旨在通过通俗易懂的语言还原解题全过程。

Home Page: https://leetcode-solution.cn/

JavaScript 16.64% HTML 0.22% Vue 30.57% Less 1.92% TypeScript 0.91% CSS 0.20% C++ 15.85% Java 17.60% Python 16.06% Shell 0.02%
algorthims

leetcode-pp's Introduction

力扣加加

deploy

力扣加加官网是一个基于 Vue 开发的 SPA 单页应用程序,借助 Github Api 获取数据。

哪里可以找到我

技术栈

  • "vue": "^2.6.11"
  • "@vue/composition-api": "^0.3.4"
  • "ant-design-vue": "^1.4.1s1"
  • Github Api v3

在线演示:力扣加加官网

Just enjoy it ฅ●ω●ฅ

贡献新书代码

本书所有代码存放在 code 文件夹。

  • 如果你需要纠错,可以按照章节找到对应文件修改。
  • 如果你需要新增语言,可以新建同名文件,后缀改为对应语言。

修改后执行 npm run bcode,然后 npm run start 查看 http://localhost:8080/book 显示是否正确。如果确认无误,可以提交 pr 给我们。

Timeline

  • 2021/02/23: 迁移到新的仓库,调整到 github pages,使用 jsdelivr 加速。视频区,专题区改版。
  • 2020/02/21: first commmit

License

This project is licensed under the MIT License.

leetcode-pp's People

Contributors

azl397985856 avatar threedayaaaaa avatar xlzy520 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

leetcode-pp's Issues

239. 滑动窗口最大值

给定一个数组 nums,有一个大小为 k 的滑动窗口从数组的最左侧移动到数组的最右侧。你只可以看到在滑动窗口内的 k 个数字。滑动窗口每次只向右移动一位。

返回滑动窗口中的最大值。

 

进阶:

你能在线性时间复杂度内解决此题吗?

 

示例:

输入: nums = [1,3,-1,-3,5,3,6,7], 和 k = 3
输出: [3,3,5,5,6,7]
解释:

  滑动窗口的位置                最大值
---------------               -----
[1  3  -1] -3  5  3  6  7       3
 1 [3  -1  -3] 5  3  6  7       3
 1  3 [-1  -3  5] 3  6  7       5
 1  3  -1 [-3  5  3] 6  7       5
 1  3  -1  -3 [5  3  6] 7       6
 1  3  -1  -3  5 [3  6  7]      7
 

提示:

1 <= nums.length <= 10^5
-10^4 <= nums[i] <= 10^4
1 <= k <= nums.length

https://leetcode-cn.com/problems/sliding-window-maximum/

278. 第一个错误的版本

你是产品经理,目前正在带领一个团队开发新的产品。不幸的是,你的产品的最新版本没有通过质量检测。由于每个版本都是基于之前的版本开发的,所以错误的版本之后的所有版本都是错的。

假设你有 n 个版本 [1, 2, ..., n],你想找出导致之后所有版本出错的第一个错误的版本。

你可以通过调用 bool isBadVersion(version) 接口来判断版本号 version 是否在单元测试中出错。实现一个函数来查找第一个错误的版本。你应该尽量减少对调用 API 的次数。

示例:

给定 n = 5,并且 version = 4 是第一个错误的版本。

调用 isBadVersion(3) -> false
调用 isBadVersion(5) -> true
调用 isBadVersion(4) -> true

所以,4 是第一个错误的版本。

https://leetcode-cn.com/problems/first-bad-version

30. 串联所有单词的子串

给定一个字符串 s 和一些长度相同的单词 words。找出 s 中恰好可以由 words 中所有单词串联形成的子串的起始位置。

注意子串要与 words 中的单词完全匹配,中间不能有其他字符,但不需要考虑 words 中单词串联的顺序。

示例 1:
输入:
s = "barfoothefoobarman",
words = ["foo","bar"]
输出:[0,9]
解释:
从索引 0 和 9 开始的子串分别是 "barfoo" 和 "foobar" 。
输出的顺序不重要, [9,0] 也是有效答案。
示例 2:

输入:
s = "wordgoodgoodgoodbestword",
words = ["word","good","best","word"]
输出:[]

https://leetcode-cn.com/problems/substring-with-concatenation-of-all-words

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.