Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 157. Read N Characters Given Read4
Given an API read4 that reads up to 4 characters from a file into a temporary buffer, implement read(buf, n) to copy up to n characters into the destination buffer using repeated read4 calls, correctly handling partial reads at EOF and returning the actual number of characters read.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late December, 2024
Mid-level
Read N Characters Given Read4
Mid September, 2024
Mid-level
Implement a problem similar to the Read-nSize() buffer question
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.