Skip to content

15814/algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

algorithm

mainly use for self-learning

sorts folder

sorts.py: including bubble_sort, insertion_sort, selection_sort and merge_sort.

Netherlands_flag.py : to solve Netherlands_flag problem

荷兰国旗问题: 给定一个数组arr,和一个数num,请把小于num的数放在数组的 左边,等于num的数放在数组的中间,大于num的数放在数组的右边. 要求额外空间复杂度O(1),时间复杂度O(N)

heap.py: to achive the heap struct.

xiaohe_wenti.py: solve the small sum problem.

小和问题: 在一个数组中,每一个数左边比当前数小的数累加起来,叫做这个数组的小和。求一个数组的小和。 小和问题和逆序对问题都是一样的,用归并排序来解。

test.py: some util functions to help test

test_scripts.py: do some test in sorts function.

Notes

notes.md:

2addnotes.md: to add notes in the later.

=======

Others

About

mainly use for self-learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published