We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I'm getting the following error no matter what I submit when using JavaScript/Node. I have submitted the correct algorithm, but also tried just returning an integer to try to debug the problem. It seems there is an error somewhere else in the pre-written JavaScript code, but I'm not sure what it is.
TypeError: Invalid non-string/buffer chunk
at validChunk (_stream_writable.js:215:10)
at SyncWriteStream.Writable.write (_stream_writable.js:244:12)
at solution (solution.js:74:20)
at ReadStream. (solution.js:56:5)
at emitNone (events.js:91:20)
at ReadStream.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Height of a Binary Tree
You are viewing a single comment's thread. Return to all comments →
I'm getting the following error no matter what I submit when using JavaScript/Node. I have submitted the correct algorithm, but also tried just returning an integer to try to debug the problem. It seems there is an error somewhere else in the pre-written JavaScript code, but I'm not sure what it is.
events.js:160 throw er; // Unhandled 'error' event ^
TypeError: Invalid non-string/buffer chunk at validChunk (_stream_writable.js:215:10) at SyncWriteStream.Writable.write (_stream_writable.js:244:12) at solution (solution.js:74:20) at ReadStream. (solution.js:56:5) at emitNone (events.js:91:20) at ReadStream.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)