selfteaching / selfteaching/selfteaching-python-camp
Day07 作业中想到的,其实每个人都有一份原始算法
Open
Nobody has claimed this yet.
学习心得分享
- Dominant language
- Python
- Stars
- 151
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
- 在做一些复杂点的东西的时候,需要先把自己的思路给理清楚,用注释的方式,写在代码的前面
- 理清思路的时候,就想一下如果是自己的大脑是如何处理这段文字的,比如说,统计文字的词频,如果不用代码,就用自己最普通的方式是如何干好这件事的
自己干活的步骤
2.1 先将每个字分类,用excel弄出一个列表,并检查里面是否有重复的,并将重复的字删掉
2.2 开始逐字阅读要处理的文字,并与刚刚准备好的excel分类表进行比对,如果有的话在文字后面+1
2.3 就这样每读一个字就在excel表中查找一边,循环这个超级枯燥的过程
译成编码思路:
- 先把文字拆分数组(array/list)并存成两份
- 把一份去重(分类)
- 并文字转换成字典格式(key:value) 并初始化值为0
- 开始遍历第一份数组,并检查分类中是否有相同的,如果有则+1
总结一下: 其实每个人都有一份最原始的算法,就是自己大脑正在使用的方法,把最原始的算法写出来,不断优化就可以了
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue contains a Chinese explanation of algorithmic thinking but names no file, test, or entry point. Start by reading the full issue and clarifying whether it proposes educational content or a concrete repository change. A contribution is not yet well-defined because the intended edit and completion criteria are missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- content
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100