codesONLY / JavaScriptONLY

Knowledge Resource of core fundamentals of JavaScript explained in simple way!
378 stars 182 forks source link

BinaryTreePaths.js #77

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 for finding all the "Paths from Root to Leaf Nodes in a given BST". I have used "Depth First Search" traversal technique and stored all the paths in an array and returned it.