Skip to content

Added function for finding K-th smallest element in BST - #2318

Merged
deadshotsb merged 12 commits into
TheAlgorithms:masterfrom
SiddhantBobde:master
Aug 21, 2020
Merged

Added function for finding K-th smallest element in BST#2318
deadshotsb merged 12 commits into
TheAlgorithms:masterfrom
SiddhantBobde:master

Conversation

@SiddhantBobde

@SiddhantBobde SiddhantBobde commented Aug 16, 2020

Copy link
Copy Markdown
Contributor

Describe your change:

#2172 fixed

Added function inorder and find_kth_smallest in Python\data_structures\binary_tree\binary_search_tree.py

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@TravisBuddy

Copy link
Copy Markdown

Hey @SiddhantBobde,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 9f4c1180-dfa2-11ea-a7d8-3d177b5d5f1d

@spamegg1

Copy link
Copy Markdown
Contributor

./data_structures/binary_tree/binary_search_tree.py:144:21: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:144:25: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:146:29: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:148:29: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:150:31: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:150:33: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:151:12: E225 missing whitespace around operator
./data_structures/binary_tree/binary_search_tree.py:152:25: E231 missing whitespace after ','
./data_structures/binary_tree/binary_search_tree.py:154:21: E226 missing whitespace around arithmetic operator
./data_structures/binary_tree/binary_search_tree.py:156:1: E302 expected 2 blank lines, found 1

These can be fixed very easily.

@SiddhantBobde

Copy link
Copy Markdown
Contributor Author

yes

@TheAlgorithms TheAlgorithms deleted a comment from MitoPushing Aug 18, 2020
@SiddhantBobde

Copy link
Copy Markdown
Contributor Author

please review my pull request.

Comment thread data_structures/binary_tree/binary_search_tree.py Outdated
Comment thread data_structures/binary_tree/binary_search_tree.py Outdated
Comment thread data_structures/binary_tree/binary_search_tree.py Outdated
Comment thread data_structures/binary_tree/binary_search_tree.py Outdated
Comment thread data_structures/binary_tree/binary_search_tree.py Outdated
@deadshotsb
deadshotsb merged commit 0bf1f22 into TheAlgorithms:master Aug 21, 2020
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
…s#2318)

* fixes: TheAlgorithms#2172

* fixes: TheAlgorithms#2172

* Added docstrings and type of parameters

* fixed error

* Added type hints

* made changes

* removed capital letters from function name

* Added type hints

* fixed bulid error

* modified comments

* fixed build error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants