Object-Oriented Programming · Datadog · Easy
Problem Implement a class that buffers write operations and automatically persists the buffer to disk once it reaches capacity. You must create class BufferWrite with the following interface: write(data): appends data to the internal buffer. flush(): immediately writes the current buffer contents to disk and clears the buffer. The buffer has a fixed capacity of 1024 bytes. Whenever a write call causes the buffer to reach or exceed this limit, flush() must be triggered…
Checking your access…