LC: 158. Read N Characters Given Read4 II Call multiple times - spiralgo/algorithms GitHub Wiki
158. Read N Characters Given Read4 II - Call multiple times:
The Essence:
Suppose, we have a file on a remote server. The content of the file might be "TheSpiralWillExpand" As we do not have direct access to the file, we need to use the Read4 interface to read the content.

Details:
You can find the discussion, a detailed explanation and implementation here: https://github.com/spiralgo/algorithms/pull/293/files