2 Star 4 Fork 1

JamLeon / leetcode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MPL-2.0

Leetcode -- 一步一步成为 offer 收割机 (算法全都是套路,牢记算法模板,offer拿到手软)

作者: Jam

  • 个人简介: 化工行业转行计算机全靠自学,目前在国内大厂工作,在力扣上传了数百道问题的解法,本仓库主要是为了总结算法套路与帮助和我一样转行,以及想深入学习算法有大厂梦的兄弟和姐妹们。

算法题分类思维导图: image

本仓库的 leetcode 文件夹下都是基于 LeetCode 的题目,涵盖了所有题型和技巧,而且一定要做到举一反三,通俗易懂算法体系化学习书籍和面试题有相关算法系统学习书籍和题目推荐。

Leetcode 算法题刷题科学刷题总结

  1. 职业训练:拆分知识点、刻意练习、总结
  2. 五步刷题法(五毒神掌)
  3. 做算法的最大误区:只刷一遍
  4. 新手建议先从简单题开始刷起,从30min/题 提升到 5min/题 就可以开始挑战刷中等难度题
  5. 大厂面试只要你能不看答案刷中等难度题,基本国内大厂随便进

面试技巧:

  1. 确定和面试官沟通的是否一致,问清楚,题目要看清楚
  2. 想所有可能的解法,找时间最优解法
  3. coding(多写)
  4. test cases(测试样例)

五毒神掌内功心法

第一遍:

  1. 读题:5分钟读题+思考
  2. 直接看解法(理解多个解法)
  3. 背诵默写

第二遍:

  1. 马上自己写,提交lc(leetcode)
  2. 多种解法比较,体会->优化(执行时间和ac)

第三遍:(24小时之后)

  1. 过了一天再重复做题
  2. 不同熟悉的解法程度->专项训练

第四遍:(1周后)

  1. 过了一周:再反复练习相同题目
  2. 专项训练

第五遍:(面试前一周)

  1. 面试前一周恢复训练
  2. 面试前一周复习算法模板与相应分类出现的题目

算法题汇总

20 个最常用的、最基础数据结构与算法,都已经总结在 算法题模板分类

10 个必考数据结构模板:数组、链表、栈、队列、散列表、二叉树、堆、跳表、图、Trie 树。

10 个必会算法模板:递归、排序、二分查找、搜索、哈希算法、贪心算法、分治算法、回溯算法、动态规划、字符串匹配算法。

不同算法类型

  1. 滑动窗口
  2. 双指针
  3. 快慢指针链表
  4. 集合查找
  5. 二叉树
  6. 字符串
  7. DFS
  8. BFS
  9. 回溯法
  10. 双堆模式
  11. 二分法与二分法变种
  12. 前K大的数模式HEAP
  13. 分治思想
  14. DP 动态规划
  15. 排序算法
  16. 链表
  17. 二叉搜索树的构建
  18. 位运算
  19. dict
  20. stack/queue
  21. math
  22. array
  23. 贪婪算法
  24. matrix
  25. 一般算法题模板

题型汇总

1. 滑动窗口

  1. 大小为 K 的子数组的最大和
  2. Best Time to Buy and Sell Stock
  3. Longest Substring Without Repeating Characters
  4. Sliding Window Maximum
  • 剑指 Offer 57 - II. 和为s的连续正数序列
# Sliding windows code template is most used in substring match or maximum/minimum problems.
# It uses two-pointer as boundary of sliding window to traverse, and use a counter(dict) maintain current state,
# and a count as condition checker, update it when trigger some key changes.
#
# Time:  O(n)
# Space: O(k) k = len(set(p))
from collections import Counter

# s - target sequence, p - pattern or restrict sequence
def sliding_window_template_with_examples(s, p):
    # initialize the hash map here
    # counter is used to record current state, could use defaultdict in some situation, for example, no p restrict
    counter = Counter(p)

    # two pointers, boundary of sliding window
    start, end = 0, 0
    # condition checker, update it when trigger some key changes, init value depend on your situation
    count = 0
    # result, return int(such as max or min) or list(such as all index)
    res = 0

    # loop the source string from begin to end
    while end < len(s):
        counter[s[end]] += 1
        # update count based on some condition
        if counter[s[end]] > 1:
            count += 1
        end += 1

        # count condition here
        while count > 0:
            '''
            update res here if finding minimum
            '''

            # increase start to make it invalid or valid again
            counter[s[start]] -= 1
            # update count based on some condition
            if counter[s[start]] > 0:
                count -= 1
            start += 1

        '''
        update res here if finding maximum
        '''
        res = max(res, end - start)

    return res

# refer to https://leetcode.com/problems/minimum-window-substring/discuss/26808/here-is-a-10-line-template-that-can-solve-most-substring-problems

2. 双指针

双指针通常用在排好序的数组或是链表中寻找对子, 或者是merge 或者是排序,或者去除element,反正一般都是头尾各一个指针,然后根据条件移动。

  1. Two Sum(# 也可以用map的方式做)
  2. Two Sum II - Input array is sorted
  3. Squares of a Sorted Array (很像merge sort里的merge)
  4. Move Zeroes
  5. Remove Element
  6. Remove Duplicates from Sorted Array
  7. 3Sum Closest
  8. 4Sum
  9. Partition List
  10. Container With Most Water
  11. Trapping Rain Water
  12. Sort Colors
  • 剑指 Offer 04. 二维数组中的查找
  • 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
# two pointers scenario, famous applications such as binary search, quick sort and sliding window.

'''
Classification:
1. old & new state: old, new = new, cur_result
2. slow & fast runner: slow-> fast->->
3. left & right boundary or index: left-> <-right
4. p1 & p2 from two sequences: p1-> p2->
5. start & end sliding window boundary: start-> end->
'''


# old & new state: old, new = new, cur_result
def old_new_state(self, seq):
    # initialize state
    old, new = default_val1, default_val2
    for element in seq:
        '''
        process current element with old state
        '''
        old, new = new, self.process_logic(element, old)


# slow & fast runner: slow-> fast->->
def slow_fast_runner(self, seq):
    # initialize slow runner
    slow = seq[0]   # for index: slow = 0
    # fast-runner grows each iteration generally
    for fast in range(seq):     # for index: range(len(seq))
        '''
        slow-runner grows with some restrictions
        '''
        if self.slow_condition(slow):
            slow = slow.next    # for index: slow += 1
        '''
        process logic before or after pointers movement
        '''
        self.process_logic(slow, fast)


# left & right boundary or index: left-> <-right
def left_right_boundary(self, seq):
    left, right = 0, len(seq) - 1
    while left < right:
        '''
        left index moves when satisfy the condition
        '''
        if self.left_condition(left):
            left += 1

        '''
        right index move when satisfy the condition
        '''
        if self.right_condition(right):
            right -= 1

        '''
        process logic before or after pointers movement
        '''
        self.process_logic(left, right)


# p1 & p2 from two sequences: p1-> p2->
def pointers_from_two_seq(self, seq1, seq2):
    # init pointers
    p1, p2 = 0, 0       # or seq1[0], seq2[0]

    # or other condition
    while p1 < len(seq1) and p2 < len(seq2):
        '''
        p1 index moves when satisfy the condition
        '''
        if self.p1_condition(p1):
            p1 += 1         # or p1 = next(seq1)

        '''
        p2 index move when satisfy the condition
        '''
        if self.p2_condition(p2):
            p2 += 1         # or p2 = next(seq2)

        '''
        process logic before or after pointers movement
        '''
        self.process_logic(p1, p2)


# start & end of sliding window: |start-> ... end->|
# more details in sliding windows templates, here is just about two-pointers part
def start_end_sliding_window(self, seq):
    start, end = 0, 0

    while end < len(seq):
        # end grows in the outer loop
        end += 1

        # start grows with some restrict
        while self.start_condition(start):
            '''
            process logic before pointers movement
            '''
            self.process_logic1(start, end)

            # start grows in the inner loop
            start += 1

        '''
        or process logic after pointers movement
        '''
        self.process_logic2(start, end)

3. 快慢指针/ 链表题目

快慢指针是处理linked list常用的套路,通常是用来判断成环以及环的入口,或者是寻找 list中第k个元素。

  1. Linked List Cycle
  2. Linked List Cycle II
  3. Palindrome Linked List
  4. Rotate List
  • 剑指 Offer 18. 删除链表的节点 JZ56 删除链表中重复的结点
  • 剑指 Offer 22. 链表中倒数第k个节点
  • 剑指 Offer 52. 两个链表的第一个公共节点

4. 原地链表翻转

  1. Palindrome Linked List
  2. Reverse Linked List
  3. Reverse Nodes in k-Group
  4. Reverse Linked List II

5. 区间合并

区间合并的问题,通常是重新把区间按照start和end排序,重新组合区间。

  1. Merge Intervals
  2. Interval List Intersections
  3. Insert Interval

6. 无序限定范围的数组元素查找O(N)

要求 inplace, 通常是采用正负反转的做法

  1. First Missing Positive
  2. Find All Numbers Disappeared in an Array 剑指 Offer 03. 数组中重复的数字

7. BFS

BFS 通常采用queue 来实现

  1. Binary Tree Level Order Traversal
  2. Binary Tree Zigzag Level Order Traversal
  3. Serialize and Deserialize Binary Tree
  4. Word Ladder I
  5. Course Schedule【拓扑排序】

8. 树的DFS

通常采用递归 111. Minimum Depth of Binary Tree

  1. Path Sum
  2. Path Sum II(和剑指 Offer 34. 二叉树中和为某一值的路径一样)
  3. Path Sum III
  4. Same Tree
  5. Symmetric Tree
  6. Maximum Depth of Binary Tree
  7. Balanced Binary Tree
  • 剑指 Offer 26. 树的子结构
  • 剑指 Offer 33. 二叉搜索树的后序遍历序列
  • 剑指 Offer 54. 二叉搜索树的第k大节点(inorder)

9. DFS/递归/回溯法

对于排列和组合的题目,需要主要判断是否会有重复数字,如有重复,需要先进行sort,而且需要进行剪枝。

  1. Subsets
  2. Subsets II
  3. Permutations
  4. Permutations II
  5. Combination Sum
  6. Coin Change
  7. Coin Change 2
  8. Combination Sum II
  9. Palindrome Partitioning !
  10. Letter Combinations of a Phone Number (differ from 91. Decode Ways)
  11. Word Search(same as 剑指 Offer 12. 矩阵中的路径)
  • 剑指 Offer 13. 机器人的运动范围
  1. 双堆模式 295 Find-Median-from-Data-Stream
  2. Sliding Window Median
  3. Min Stack
  • 剑指 Offer 09. 用两个栈实现队列

11. 二分法与二分法变种

当你需要解决的问题的输入是排好序的数组,链表,或是排好序的矩阵,要求咱们寻找某些特定元素。这个时候的不二选择就是二分搜索。

  1. Search Insert Position
  2. Find First and Last Position of Element in Sorted Array
  3. Search in Rotated Sorted Array
  4. Find Minimum in Rotated Sorted Array
  5. Find Minimum in Rotated Sorted Array II(same as [剑指 Offer 11. 旋转数组的最小数字])
  6. Find Peak Element
  7. Single Element in a Sorted Array
  • 剑指 Offer 16. 数值的整数次方(2分法)

12. 前K大的数模式HEAP

采用priority queue 或者 说在python 中的heapq 求top k 采用最小堆(默认) 采用最大堆的时候可以采用push 负的value

  1. Kth Largest Element in an Array
  2. Top K Frequent Elements
  3. Find K Pairs with Smallest Sums

13. K路归并

K路归并能帮咱们解决那些涉及到多组排好序的数组的问题。

  1. Merge k Sorted Lists
  2. Merge Two Sorted Lists

14. DP 动态规划

  1. Longest Increasing Subsequence
  2. Longest Common Subsequence
  3. Edit Distance
  4. Wildcard Matching
  5. Regular Expression Matching
  6. Triangle
  7. Maximum Subarray
  8. Maximum Product Subarray
  9. Super Egg Dropref
  10. House Robber
  11. House Robber II (两个dp)
  12. Best Time to Buy and Sell Stock
  13. Best Time to Buy and Sell Stock II
  14. Best Time to Buy and Sell Stock IV
  15. Best Time to Buy and Sell Stock III ref
  16. Best Time to Buy and Sell Stock with Transaction Fee
  17. Best Time to Buy and Sell Stock with Cooldown
  18. Longest Palindromic Subsequence !
  19. Longest Palindromic Substring
  20. Partition Equal Subset Sum
  21. Coin Change
  22. Coin Change 2
  23. Decode Ways
  24. Word Break
  • 剑指 Offer 10- I. 斐波那契数列
  • 剑指 Offer 10- II. 青蛙跳台阶问题 矩形覆盖 变态跳台阶
  • 剑指 Offer 14- I. 剪绳子
  • 剑指 Offer 46. 把数字翻译成字符串
  • 剑指 Offer 47. 礼物的最大价值
  • 剑指 Offer 49. 丑数
  • 剑指 Offer 60. n个骰子的点数

15. 排序算法

  • Selection Sort
  • Heapsort
  • Mergesort
  • Insertion Sort
  • Shell's Sort
  • Quicksort
  • Bubblesort
  • Linear Sorting

16. 树和链表结合

  1. 二叉搜索树与双向链表
  2. Convert Sorted List to Binary Search Tree
  3. Flatten Binary Tree to Linked List

17. 树的重新构建

  1. Construct Binary Tree from Preorder and Inorder Traversal
  2. Construct Binary Tree from Inorder and Postorder Traversal
  3. Construct String from Binary Tree
  4. Construct Binary Search Tree from Preorder Traversal
  5. Construct Binary Tree from Preorder and Postorder Traversal

18. 位运算

  1. Single Number
  2. Single Element in a Sorted Array
  3. Reverse Bits
  • 剑指 Offer 15. 二进制中1的个数
  • 剑指 Offer 56 - I. 数组中数字出现的次数
  • 剑指 Offer 56 - II. 数组中数字出现的次数 II

19. 字符串

一般都有很多corner cases 需要考虑

  1. String to Integer (atoi)
  • 剑指 Offer 20. 表示数值的字符串
  • 剑指 Offer 58 - I. 翻转单词顺序(2次翻转)
  • 剑指 Offer 58 - II. 左旋转字符串

20. stack

  • 剑指 Offer 31. 栈的压入、弹出序列

21. math

  1. Factorial Trailing Zeroes
  2. Implement Rand10() Using Rand7()

22. array

  • 剑指 Offer 66. 构建乘积数组

23. 二叉搜索树

  • 剑指 Offer 68 - I. 二叉搜索树的最近公共祖先
  • 剑指 Offer 68 - II. 二叉树的最近公共祖先
  • 二叉树的下一个结点

算法和数据结构(学习相关书籍推荐)

Donate

如果本仓库对你有帮助,可以请作者喝杯速溶咖啡,给大家推荐个Google大佬的算法课程。

Mozilla Public License Version 2.0 ================================== 1. Definitions -------------- 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. 1.3. "Contribution" means Covered Software of a particular Contributor. 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. 1.5. "Incompatible With Secondary Licenses" means (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. 1.6. "Executable Form" means any form of the work other than Source Code Form. 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" means this document. 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. 1.10. "Modifications" means any of the following: (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or (b) any new file in Source Code Form that contains any Covered Software. 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. 1.13. "Source Code Form" means the form of the work preferred for making modifications. 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. License Grants and Conditions -------------------------------- 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. 2.2. Effective Date The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. 2.3. Limitations on Grant Scope The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: (a) for any code that a Contributor has removed from Covered Software; or (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). 2.5. Representation Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. 2.6. Fair Use This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities ------------------- 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. 3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then: (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). 3.4. Notices You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation --------------------------------------------------- If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination -------------- 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ * * * 6. Disclaimer of Warranty * * ------------------------- * * * * Covered Software is provided under this License on an "as is" * * basis, without warranty of any kind, either expressed, implied, or * * statutory, including, without limitation, warranties that the * * Covered Software is free of defects, merchantable, fit for a * * particular purpose or non-infringing. The entire risk as to the * * quality and performance of the Covered Software is with You. * * Should any Covered Software prove defective in any respect, You * * (not any Contributor) assume the cost of any necessary servicing, * * repair, or correction. This disclaimer of warranty constitutes an * * essential part of this License. No use of any Covered Software is * * authorized under this License except under this disclaimer. * * * ************************************************************************ ************************************************************************ * * * 7. Limitation of Liability * * -------------------------- * * * * Under no circumstances and under no legal theory, whether tort * * (including negligence), contract, or otherwise, shall any * * Contributor, or anyone who distributes Covered Software as * * permitted above, be liable to You for any direct, indirect, * * special, incidental, or consequential damages of any character * * including, without limitation, damages for lost profits, loss of * * goodwill, work stoppage, computer failure or malfunction, or any * * and all other commercial damages or losses, even if such party * * shall have been informed of the possibility of such damages. This * * limitation of liability shall not apply to liability for death or * * personal injury resulting from such party's negligence to the * * extent applicable law prohibits such limitation. Some * * jurisdictions do not allow the exclusion or limitation of * * incidental or consequential damages, so this exclusion and * * limitation may not apply to You. * * * ************************************************************************ 8. Litigation ------------- Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous ---------------- This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License --------------------------- 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. 10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice ------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice --------------------------------------------------------- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.

简介

python 数据结构与算法 leetcode 算法题与书籍 刷算法全靠套路!Crack LeetCode, not only how, but also why. 展开 收起
Python 等 2 种语言
MPL-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/jam_liang/leetcode.git
git@gitee.com:jam_liang/leetcode.git
jam_liang
leetcode
leetcode
master

搜索帮助