Skip to main content

This is a simple package about Data Structure packed by C/C++ language.

Project description

example!

from AdroitFisherman.DoubleLinkedListWithoutHeadNode.Double import DoubleLinkedListWithoutHeadNode_double
if __name__ == '__main__':
    operate=0
    test=DoubleLinkedListWithoutHeadNode_double()
    while operate<16:
        print("1:Init linear list	2:Destroy linear list	3:Clear Linear list", end='\n')
        print("4:Is list empty	5:Get list length	6:Get elem's value", end='\n')
        print("7:Get elem's index	8:Get elem's prior elem	9:Get elem's next elem", end='\n')
        print("10:Add elem to the first position	11:Add elem to the last position	12:Insert elem into list", end='\n')
        print("13:Delete elem	14:View list	15:View list by reverse order", end='\n')
        operate = int(input("please choose operation options:"))
        if operate==1:
            test.init_list()
        elif operate==2:
            test.destroy_list()
        elif operate==3:
            test.clear_list()
        elif operate==4:
            if test.list_empty()==True:
                print("empty",end='\n')
            else:
                print("not empty",end='\n')
        elif operate==5:
            print(f"length:{test.list_length()}",end='\n')
        elif operate==6:
            index=int(input("please input elem's position:"))
            print(f"elem value:{test.get_elem(index)}")
        elif operate==7:
            elem=float(input("please input elem's value:"))
            print("elem position:%d"%test.locate_elem(elem))
        elif operate==8:
            elem = float(input("please input elem's value:"))
            print("prior elem's value:%f" % test.prior_elem(elem))
        elif operate==9:
            elem = float(input("please input elem's value:"))
            print("next elem's value:%f" % test.next_elem(elem))
        elif operate==10:
            elem = float(input("please input elem's value:"))
            test.add_first(elem)
            for i in range(0,test.list_length(),1):
                print(test.get_elem(i),end='\t')
            print(end='\n')
        elif operate==11:
            elem = float(input("please input elem's value:"))
            test.add_after(elem)
            for i in range(0,test.list_length(),1):
                print(test.get_elem(i),end='\t')
            print(end='\n')
        elif operate==12:
            index = int(input("please input elem's position:"))
            elem = float(input("please input elem's value:"))
            test.list_insert(index, elem)
            for i in range(0,test.list_length(),1):
                print(test.get_elem(i),end='\t')
            print(end='\n')
        elif operate==13:
            index = int(input("please input elem's position:"))
            test.list_delete(index)
            for i in range(0,test.list_length(),1):
                print(test.get_elem(i),end='\t')
            print(end='\n')
        elif operate==14:
            for i in range(0,test.list_length(),1):
                print(test.get_elem(i),end='\t')
            print(end='\n')
        elif operate==15:
            test.traverse_list_by_reverse_order()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AdroitFisherman-0.0.19.tar.gz (22.9 MB view details)

Uploaded Source

Built Distribution

AdroitFisherman-0.0.19-py3-none-any.whl (23.2 MB view details)

Uploaded Python 3

File details

Details for the file AdroitFisherman-0.0.19.tar.gz.

File metadata

  • Download URL: AdroitFisherman-0.0.19.tar.gz
  • Upload date:
  • Size: 22.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for AdroitFisherman-0.0.19.tar.gz
Algorithm Hash digest
SHA256 8088b5b30a5660a840cf1d77c89f3fb9a24f505e70ae61a1198e2fdbb03e573a
MD5 5475edc67b3d12bf4d5892f1548ddf21
BLAKE2b-256 7f6b8721c09efa7c6f113fc34028938dc287c71ec486194803c325ba68f0de89

See more details on using hashes here.

File details

Details for the file AdroitFisherman-0.0.19-py3-none-any.whl.

File metadata

File hashes

Hashes for AdroitFisherman-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 fee11209cc181eb491e2513c0895109173b578fc28375886d7a5064dacee5836
MD5 58518faf0b80ff855f4bf4d78213bf95
BLAKE2b-256 24f04585ae566d1daaef196529505833432404331710dad75f3063b6d398f5af

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page