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

Uploaded Source

Built Distribution

AdroitFisherman-0.0.21-py3-none-any.whl (28.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: AdroitFisherman-0.0.21.tar.gz
  • Upload date:
  • Size: 27.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.21.tar.gz
Algorithm Hash digest
SHA256 a103da7f378f442f463a2847e00afe1f97461859b916626ece17afae482230da
MD5 933ca9e3613363fe947acb87e9269d43
BLAKE2b-256 226847909b6336981c3ee21f1749b0ebdf4da9754852f635c18e4fc00eed66b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for AdroitFisherman-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 5abb187750608cfef96491ef07e206891390cccf20221bad9c36084690761d25
MD5 f2ec652a44973ac3f20de9e382a613fb
BLAKE2b-256 adc6964e3154b15f11889106b7787684f13fa424bddeab6f6861f1d14219a877

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