py_dsa
1.0.0
PY-DSAモジュールには、すべてのデータ構造とアルゴリズムの実装が含まれています。
以下に示すように、PIPを使用してモジュールをインストールできます。
pip install py-dsa次の例を考えてみましょう。
from py_dsa . data_structures import *
test_linkedlist = LinkedList ()
test_linkedlist . add_first ( 10 )
test_linkedlist . add_first ( 20 )
test_linkedlist . add_first ( 30 )
test_linkedlist . remove_last ()
test_linkedlist . reverse_list ()
test_linkedlist . print_list ()
"""
Output :
20
30
""" from py_dsa . data_structures import *
test_tree = Tree ()
test_tree . add ( 10 )
test_tree . add ( 5 )
test_tree . add ( 30 )
print ( test_tree . height ())
test_tree . invert_tree ()
test_tree . print_tree ( traversal = 'postorder' )
"""
Output:
2
30
5
10
""" from py_dsa . algorithms import *
a = [ 1 , 2 , 3 , 4.5 ]
s = Searching ()
print ( s . linear_search ( a , 3 ))
"""
Output :
2
"""Py-DSAをインストールするには、テストを開発および実行するために必要なツールとともに。次のコマンドを実行します。
$ pip install -e .[dev]テストを実行するには、次のコマンドを入力してください。
py.testGithub Issue Trackerを使用して、バグまたはリクエスト機能を送信してください。
Copyright Vaidhyanathan SM、2021
MITライセンスの条件の下で配布されるPy-DSAは、無料でオープンソースソフトウェアです。