Adobe Interview Question
MTSsCountry: India
We have to consider one thing to transform the problem to Knapsack : the surface area a letter will take with a given font.
Start with minimum surface area letters towards larger ones.
Hence maximizing the number of letters cut out and minimizing wastage of paper i.e the rough sheet size.
The question is not clear.
- ACP Pradyuman June 21, 2013Just cut one character of a different size (any character of the same size should not be cut again, as it will increase the rough sheet size).
set<pair<size>> can be used for checking if the size exists.