Problem 158 · Hard

Read N Characters Given Read4 II - Call multiple times

Read N characters with multiple calls to read() with caching.

Open the interactive visualisation