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.20.tar.gz (25.4 MB view details)

Uploaded Source

Built Distribution

AdroitFisherman-0.0.20-py3-none-any.whl (25.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: AdroitFisherman-0.0.20.tar.gz
  • Upload date:
  • Size: 25.4 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.20.tar.gz
Algorithm Hash digest
SHA256 c335559b5beeb11c19a5da99ac49bc76c16e023cdcb95b83d28f75d67e0de736
MD5 c8c45c39b48a810fd926fadcbf7a7f37
BLAKE2b-256 452497c2dc47816c4d881a54035cc6db786420954162db952f86b9d52eef24dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for AdroitFisherman-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 e5938832c98037661c3521f84f9ad8ea21bfe392fab38e1758081f8d331c88bc
MD5 9e73f43108480d95b899ecf377c4b89a
BLAKE2b-256 05fb3fff2ad510e4257d656b29dedfd89e87337d457d0e6cbd3e784e1cd84282

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