1. Anagram Combination Counting Problem
Given a list of words and sentences, determine how many unique sentences can be formed by replacing each word with any of its anagrams.
Example:
words = [‘listen’, ‘silent’, ‘it’, ‘is’]
sentences = [‘listen it is silent’, ‘listen it is silent listen’]
output = [4, 8]
⸻
2. Implementing a File-System “find” Command
Imagine implementing something like the Unix find command in a high-level language.
Write code that can handle queries such as:
• Find all files over 5 MB under a directory
• Find all XML files under a directory
• Advanced: files whose extension is Java OR all XML files with size between 5MB and 10MB
⸻
3. Currency Conversion Problem
Given a log of currency conversion rates (e.g., USD→EUR, EUR→GBP), write a function that converts between any two currencies.
Example entries:
{“from”:“USD”, “to”:“EUR”, “rate”:1.1}
{“from”:“EUR”, “to”:“GBP”, “rate”:1.2}
Meaning 1 USD = 1.32 GBP.
4: system design: book store review api