sahilrajput03 / learn-dsa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learn DSA

DSA Motivation: Click here

Quick Links:

What O()?

Lovely Answers: Click here

DSA problem solving in JS

Input reading libraries:

  • inquirer (17.1k*)

  • readline-sync (750*, and its archived on github)

  • Using native readline via async code. Source: nodejs docs - Accept-input-from-the-command-line-in-nodejs

     const readline = require('readline').createInterface({
     	input: process.stdin,
     	output: process.stdout,
     })
    
     const read = () => new Promise((resolve) => readline.question(``, resolve))
    
     const main = async () => {
     	console.log(await read())
     	readline.close() // This is not redundant!
    
     	// do your programming stuff here!
     	console.log('program code here....')
     }
     main()

Tree Traversal orders

tree-traversal--Geeks-post-order

About


Languages

Language:JavaScript 100.0%