Algorithm · Citadel · Medium
Requirements Implement a function that accepts a text-file path and prints every line in reverse order: begin with the file's final line and finish with its first line. Consider the following progression of follow-up questions: What is the simplest correct implementation? How would you reduce additional memory usage to O(1) without storing the entire file or all of its lines? Subject to that memory limit, how could you improve either execution time or I/O behavior for very…
Checking your access…