Back to problems

Decode Password from File

Algorithm · Instacart · Easy

Create a program that processes a file one byte at a time to obtain passwords. The initial password is guaranteed to be valid, and the first repeated index marks where the next password begins. The program must be able to continue cycling through passwords read from the file. The input is a file containing a sequence of byte values. Use the function interface readPasswords(file) -> list[list[byte]]. The output is the passwords in file order, represented as lists of byte…

Checking your access…