Leetcode 157. Read N Characters Given Read4

1 · Brian Bernal · July 30, 2021, midnight
For this problem I am given a method that reads 4 characters from a file and I have to implement a method that will read n characters from a file using this method. The characters are copied into the buffer ‘buf’ and I must return the number of characters copied. URL: https://leetcode.com/problems/read-n-characters-given-read4/submissions/ My solution: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 /** * The read4 API ...