Driver program to test above functions
let root = new Node ( ' ' ) ; root . left = new Node ( ' ' ) ; root . right = new Node ( ' ' ) ; root . left . left = new Node ( ' ' ) ; root . left . right = new Node ( ' ' ) ; root . right . right = new Node ( ' ' ) ; root . right . right . right = new Node ( ' ' ) ; root . right . right . left = new Node ( ' ' ) ; let str = dupSub ( root ) ; if ( str == ( " " ) ) document . write ( " " ) ; else document . write ( " " ) ;