Git Product home page Git Product logo

apachecn-algo-zh's Introduction

ApacheCN 数据结构与算法译文集

协议:CC BY-NC-SA 4.0

程序员的双手是魔术师的双手,他们把枯燥无味的代码变成了丰富多彩的软件。——《疯狂的程序员》

目录

贡献指南

为了不断改进翻译质量,我们特此启动了【翻译、校对、笔记整理活动】,开设了多个校对项目。贡献者校对一章之后可以领取千字2~4元的奖励。进行中的校对活动请见活动列表。更多详情请联系飞龙(Q562826179,V:wizardforcel)。

联系方式

负责人

其他

下载

Docker

docker pull apachecn0/apachecn-algo-zh
docker run -tid -p <port>:80 apachecn0/apachecn-algo-zh
# 访问 http://localhost:{port} 查看文档

PYPI

pip install apachecn-algo-zh
apachecn-algo-zh <port>
# 访问 http://localhost:{port} 查看文档

NPM

npm install -g apachecn-algo-zh
apachecn-algo-zh <port>
# 访问 http://localhost:{port} 查看文档

赞助我们

apachecn-algo-zh's People

Contributors

timgates42 avatar wizardforcel 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apachecn-algo-zh's Issues

Add demo gif to README

Disclaimer: This is a bot

It looks like your repo is trending. The github_trending_videos Instgram account automatically shows the demo gifs of trending repos in Github.

Your README doesn't seem to have any demo gifs. Add one and the next time the parser runs it will pick it up and post it on its Instagram feed. If you don't want to just close this issue we won't bother you again.

Python刷题技巧笔记.md #18

for i in range(100000):
    for j in range(10):
        a[i][j] = 0
        
for j in range(10):
    for i in range(100000):
        a[j][i] = 0

应该是这个意思,源代码没有 j

IndentationError and undefined names

flake8 testing of https://github.com/apachecn/LeetCode on Python 3.7.0

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./docs/Leetcode_Solutions/Summarization/python_base.py:6:4: E999 IndentationError: unexpected indent
    dir(obj)            # 简单的列出对象obj所包含的方法名称,返回一个字符串列表
   ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:14:11: F821 undefined name 'matrix'
row = len(matrix)
          ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:15:11: F821 undefined name 'matrix'
col = len(matrix[0]) if row else 0
          ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:38:4: F821 undefined name 'key'
if key in D:
   ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:39:5: F821 undefined name 'key'
  D[key].append(1)
    ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:41:5: F821 undefined name 'key'
  D[key] = []
    ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:45:1: F821 undefined name 'string'
string[::-1]
^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:47:10: F821 undefined name 'string'
"".join([string].reverse())
         ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:56:16: F821 undefined name 'heap'
heapq.heappush(heap, item) # 把item添加到heap中(heap是一个列表)
               ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:56:22: F821 undefined name 'item'
heapq.heappush(heap, item) # 把item添加到heap中(heap是一个列表)
                     ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:58:15: F821 undefined name 'heap'
heapq.heappop(heap) # 把堆顶元素弹出,返回的就是堆顶
              ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:60:19: F821 undefined name 'heap'
heapq.heappushpop(heap, item) # 先把item加入到堆中,然后再pop,比heappush()再heappop()要快得多
                  ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:60:25: F821 undefined name 'item'
heapq.heappushpop(heap, item) # 先把item加入到堆中,然后再pop,比heappush()再heappop()要快得多
                        ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:62:19: F821 undefined name 'heap'
heapq.heapreplace(heap, item) # 先pop,然后再把item加入到堆中,比heappop()再heappush()要快得多
                  ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:62:25: F821 undefined name 'item'
heapq.heapreplace(heap, item) # 先pop,然后再把item加入到堆中,比heappop()再heappush()要快得多
                        ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:64:15: F821 undefined name 'x'
heapq.heapify(x) # 将列表x进行堆调整,默认的是小顶堆
              ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:66:14: F821 undefined name 'iterables'
heapq.merge(*iterables) # 将多个列表合并,并进行堆调整,返回的是合并后的列表的迭代器
             ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:68:16: F821 undefined name 'n'
heapq.nlargest(n, iterable, key=None) # 返回最大的n个元素(Top-K问���)
               ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:68:19: F821 undefined name 'iterable'
heapq.nlargest(n, iterable, key=None) # 返回最大的n个元素(Top-K问题)
                  ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:70:17: F821 undefined name 'n'
heapq.nsmallest(n, iterable, key=None) # 返回最小的n个元素(Top-K问题)
                ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:70:20: F821 undefined name 'iterable'
heapq.nsmallest(n, iterable, key=None) # 返回最小的n个元素(Top-K问题)
                   ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:98:16: F821 undefined name 'n'
for i in range(n):
               ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:100:3: F821 undefined name 'a'
  a[~i] = 1
  ^
1     E999 IndentationError: unexpected indent
22    F821 undefined name 'matrix'
23

18题

`for i in range(100000):
for j in range(10):
a[i][j] = 0

for j in range(10):
for i in range(100000):
a[j][i] = 0`
源代码没有j, 只有i

001

001 题的实现就有问题吧。。。。

剑指Offer Python 11题

如果输入的数字超过32位的负数怎么办。毕竟python的负数存储不一样,而且没有位数限制。

项目布局规划

大厂面试: 1面知识面,2面技术深度,3面项目经验,4面职业规划
小厂面试: 1面技能和项目, 2面职业规划

知识面: 基础的算法面试题,技能的知识面
技术深度:基于技能的知识面,会针对具体的几个聊聊深入的底层原理和优化
项目经验:只要是看项目经验中,是否能胜任目前公司招聘人员的要求
职业规划:扯淡为主,毕竟大家都是相互套路一下

欢迎补充 ...

flake8 issues to fix

flake8 testing of https://github.com/apachecn/LeetCode on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./docs/Leetcode_Solutions/Summarization/python_base.py:6:4: E999 IndentationError: unexpected indent
    dir(obj)            # 简单的列出对象obj所包含的方法名称,返回一个字符串列表
   ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:14:11: F821 undefined name 'matrix'
row = len(matrix)
          ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:15:11: F821 undefined name 'matrix'
col = len(matrix[0]) if row else 0
          ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:38:4: F821 undefined name 'key'
if key in D:
   ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:39:5: F821 undefined name 'key'
  D[key].append(1)
    ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:41:5: F821 undefined name 'key'
  D[key] = []
    ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:45:1: F821 undefined name 'string'
string[::-1]
^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:47:10: F821 undefined name 'string'
"".join([string].reverse())
         ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:56:16: F821 undefined name 'heap'
heapq.heappush(heap, item) # 把item添加到heap中(heap是一个列表)
               ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:56:22: F821 undefined name 'item'
heapq.heappush(heap, item) # 把item添加到heap中(heap是一个列表)
                     ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:58:15: F821 undefined name 'heap'
heapq.heappop(heap) # 把堆顶元素弹出,返回的就是堆顶
              ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:60:19: F821 undefined name 'heap'
heapq.heappushpop(heap, item) # 先把item加入到堆中,然后再pop,比heappush()再heappop()要快得多
                  ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:60:25: F821 undefined name 'item'
heapq.heappushpop(heap, item) # 先把item加入到堆中,然后再pop,比heappush()再heappop()要快得多
                        ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:62:19: F821 undefined name 'heap'
heapq.heapreplace(heap, item) # 先pop,然后再把item加入到堆中,比heappop()再heappush()要快得多
                  ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:62:25: F821 undefined name 'item'
heapq.heapreplace(heap, item) # 先pop,然后再把item加入到堆中,比heappop()再heappush()要快得多
                        ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:64:15: F821 undefined name 'x'
heapq.heapify(x) # 将列表x进行堆调整,默认的是小顶堆
              ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:66:14: F821 undefined name 'iterables'
heapq.merge(*iterables) # 将多个列表合并,并进行堆调整,返回的是合并后的列表的迭代器
             ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:68:16: F821 undefined name 'n'
heapq.nlargest(n, iterable, key=None) # 返回最大的n个元素(Top-K问题)
               ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:68:19: F821 undefined name 'iterable'
heapq.nlargest(n, iterable, key=None) # 返回最大的n个元素(Top-K问题)
                  ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:70:17: F821 undefined name 'n'
heapq.nsmallest(n, iterable, key=None) # 返回最小的n个元素(Top-K问题)
                ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:70:20: F821 undefined name 'iterable'
heapq.nsmallest(n, iterable, key=None) # 返回最小的n个元素(Top-K问题)
                   ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:98:16: F821 undefined name 'n'
for i in range(n):
               ^
./docs/Leetcode_Solutions/Summarization/Python刷题技巧笔记.py:100:3: F821 undefined name 'a'
  a[~i] = 1
  ^
1     E999 IndentationError: unexpected indent
22    F821 undefined name 'matrix'
23

Undefined names: TreeNode, RandomListNode, and ListNode

flake8 testing of https://github.com/apachecn/awesome-algorithm on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./docs/剑指offer/Python/61-序列化二叉树.py:27:20: F821 undefined name 'TreeNode'
            root = TreeNode(int(l[self.flag]))
                   ^
./docs/剑指offer/Python/25-复杂链表的复制.py:16:22: F821 undefined name 'RandomListNode'
            pClone = RandomListNode(pNode.label)
                     ^
./docs/剑指offer/Python/56-删除链表中重复的结点.py:11:17: F821 undefined name 'ListNode'
        first = ListNode(-1)
                ^
3     F821 undefined name 'RandomListNode'
3

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

Duplicate file issue

Hey there,

I believe that there are two files with the same name, which causes the issue that one is trying to replace the other, so git keeps asking me to commit this modification. I can not do anything like stash or checkout to avoid it. Please delete either file.

Path: docs/Leetcode_Solutions/C++/024._Swap_Nodes_in_Pairs.md

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.