File System Encryption Count and Minimum-Cost Encryption
Asked at Databricks · Coding Questions · Difficulty: Easy · Last asked Jun 6, 2026
A file system is a tree. Each node is either a file or a directory, and a directory holds a list of children that are files or other directories. Every file is either encrypted or not. You will count files by encryption state, and then work out the cheapest way to encrypt everything that is still unencrypted.
Loading the problem…