gdsc-gvp / DSA

Implementation of various data structures and algorithms.
MIT License
15 stars 52 forks source link

Added AVL Tree implementation #81

Closed imsushant12 closed 3 years ago

imsushant12 commented 3 years ago

Related Issue

Issue Number : #78

Closes: #78

Describe the changes you've made

I have added the implementation of the AVL Tree along with sample output and Time Complexity in C Language.

Type of change

What sort of change have you made:

I have verified it with sample input and output.

himabindu-run commented 3 years ago

@imsushant12 There is a bug, while we give a string as input, the code is going into an Infinite loop! Example: I gave "wercg" as an element to Insert in the tree. This is the case, can please fix the bug and let us know?

image

@tireless-22 Take a look please

imsushant12 commented 3 years ago

@imsushant12 There is a bug, while we give a string as input, the code is going into an Infinite loop! Example: I gave "wercg" as an element to Insert in the tree. This is the case, can please fix the bug and let us know?

image

@tireless-22 Take a look please

It is supoosed to work on integers only as I have taken int.

himabindu-run commented 3 years ago

@imsushant12 Yes, I understood that but can you do something to alert/indicate the user to not give strings or handle that condition?

rakesh0x7 commented 3 years ago

@himabindu-run please have a look