Similar implementation can be found at Here
Test cases and Initial setup with expressJS is not included here. /js/script.js file provides the accepted solution
Similar implementation can be found at Here
Test cases and Initial setup with expressJS is not included here. /js/script.js file provides the accepted solution