Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
/ pyalgs4 Public

This is a implement of Algorithms 4th Edition(Princeton) by using Python3.

License

Notifications You must be signed in to change notification settings

kada7/pyalgs4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyalgs4

This is a implement of Algorithms 4th Edition(Princeton) by Python3.

Attention

  • Please download the algs4-data package from the office site, then make sure the directory tree like this:
algorithms/
|
--algs4-data/
  |
  --1Kints.txt
  |
  --2Kints.txt
  |
  --......
  • I use open('path') function as input instead of streams of Linux, so please do not use < to input data. You can run program like this:
pyalgs4$ python TopM_2.6.py 5 ./algs4-data/tinyBatch.txt

About

According to Algorithms 4th Edition, these algorithms are implemented by Java, but I hardly use Java. So I decided to implement these algorithms by Python.

Because of an apparent lack of programming skills, these codes still have to be improved, welcome to submit issues anytime.


pyalgs4

此为《算法(第四版)》(普林斯顿大学)一书的Python实现。

注意

  • 请从官网下载algs4-data包,并确保目录树如下:
algorithms/
|
--algs4-data/
  |
  --1Kints.txt
  |
  --2Kints.txt
  |
  --......
  • 本实现使用open('path')函数作为输入,而不是使用Linux的流,因此请勿使用<符号输入数据。可以使用如下方式运行程序:
pyalgs4$ python TopM_2.6.py 5 ./algs4-data/tinyBatch.txt

关于

《算法》一书采Java用实现算法,但由于本人几乎不使用Java,故希望使用Python来实现这些算法。 由于本人编码水平有限,代码并没有严格Python Zen,如何疑问,欢迎提出。

About

This is a implement of Algorithms 4th Edition(Princeton) by using Python3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages