codesankalp / dsalgo

MIT License
8 stars 24 forks source link

BST_Traversal_Algo #34

Closed shaonakundu closed 3 years ago

shaonakundu commented 3 years ago

I have created Binary Search Tree traversal algorithms(Pre, post and inorder) in dsalgo folder using Python. Thanks for assigning me this task for Hactoberfest2020 and it was wonderful to contribute.

shaonakundu commented 3 years ago
l = int(input())

arr = list(map(int, input().split()))

for i in range(l):
  tree.create(arr[i])

preorder(tree.root)
postorder(tree.root)
inorder(tree.root

For testing use python test framework unittest and add your test cases their only implementation of BST algo will remain in BST_Traversal_Algorithms.py .The path where you going to write tests for this issue is dsalgo/tests & named as "BST_algo_test.py". For more info regarding unittest framework visit:

Hey, I have uploaded the unittest, can you check and let me know if its correct or not

shaonakundu commented 3 years ago

@shaonakundu link the issue in your commit. Also, squash your commits in one. It's always better to have a single commit for an issue to track it later

Its not an issue I was asked to add another file to tests folder, so I asked to check it

codesankalp commented 3 years ago

@shaonakundu we will not approve your pull request until it's linked with an issue. Linking the issue with pull request is a must step. Also make the code changes as mengtioned by @devkapilbansal

shaonakundu commented 3 years ago

Ok so you mean this tree traversal issue to be linked with pull request?

shaonakundu commented 3 years ago

Can you guide me how to link the issue with pull req

Aryamanz29 commented 3 years ago

Hey, I have uploaded the unittest, can you check and let me know if it's correct or not

Hello, after reviewing your code locally I have found many errors in both files (like improper indentations, no module name error in the test file, and many more). Kindly before creating any PR check your code locally and one more thing when you are using unittest framework use their inbuilt methods to check whether the test passes or not ( some methods are assertEqual(), assetnotEqual(), and many more)

Aryamanz29 commented 3 years ago

Hey, I have uploaded the unittest, can you check and let me know if it's correct or not

Hello, after reviewing your code locally I have found many errors in both files (like improper indentations, no module name error in the test file, and many more). Kindly before creating any PR check your code locally and one more thing when you are using unittest framework use their inbuilt methods to check whether the test passes or not ( some methods are assertEqual(), assetnotEqual(), and many more)

@shaonakundu Are you working on this issue?

shaonakundu commented 3 years ago

Hey, I have uploaded the unittest, can you check and let me know if it's correct or not

Hello, after reviewing your code locally I have found many errors in both files (like improper indentations, no module name error in the test file, and many more). Kindly before creating any PR check your code locally and one more thing when you are using unittest framework use their inbuilt methods to check whether the test passes or not ( some methods are assertEqual(), assetnotEqual(), and many more)

@shaonakundu Are you working on this issue?

I tried a lot but there is some issue with my system , you can unassign me, sorry for the inconvinience