codesONLY / JavaScriptONLY

Knowledge Resource of core fundamentals of JavaScript explained in simple way!
382 stars 181 forks source link

Kth Smallest Element in a BST.js #72

Closed DEV-AB-03 closed 2 years ago

DEV-AB-03 commented 2 years ago

Here I have proposed the solution for one of the most famous interview questions asked in the "FAANG" companies in Binary Search Trees Data Structure which is to find the Kth Smallest Element in a BST. Here I have used "Depth First Search" traversal technique(Inorder Traversal) to store the Node Values in Increasing Order in an array and then retrieve "K-1"th term from it.

sohamsshah commented 2 years ago

camelCase format is needed.

DEV-AB-03 commented 2 years ago

I have changed it to camelCase as requested. Please Verify the same.

sohamsshah commented 2 years ago

Thanks!

DEV-AB-03 commented 2 years ago

Thank You for Merging!:)