Skip to content

Instantly share code, notes, and snippets.

View pramodmg's full-sized avatar
👉
Front End Dev, #reactjs, react, #javascript

Pramod M G pramodmg

👉
Front End Dev, #reactjs, react, #javascript
  • Bangalore,Karnataka
View GitHub Profile
@Smakar20
Smakar20 / flattenBfs.js
Created December 27, 2017 18:09
flattenBfs created by smakar20 - https://repl.it/@smakar20/flattenBfs
//Given a binary tree, flatten it to a linked list levelwise.
class Tree{
constructor(val){
this.val = val
this.left = null
this.right = null
}
insertLeft(val){