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

Uploaded Source

Built Distribution

AdroitFisherman-0.0.18-py3-none-any.whl (18.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: AdroitFisherman-0.0.18.tar.gz
  • Upload date:
  • Size: 17.8 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.18.tar.gz
Algorithm Hash digest
SHA256 96d3aa2ca3216e7ac5a3ad351d96d02ec079a3e6951bfee76d768dcd697a9dca
MD5 bd301510815e2b6acd003715eec12829
BLAKE2b-256 29cd3861da7425a75a29d6e42dfc15331a9f892a69bf2ddb7da5f2b9f66e4d7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for AdroitFisherman-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 76673bb182ecbc65d5e9de6df8c184cf648b6730b514d2abd1cf409c946b20f2
MD5 04790040ea4498e27abbd5557f1c8ee6
BLAKE2b-256 31bcded27b252268d1405e918051804b6d5e070c4d55e196035e247f8c66c1f2

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