Summary
I recently took the DealShare Online Assessment and wanted to share the questions I encountered. The assessment included two primary coding challenges, one of which required a Trie-based solution while the other was similar to the 'Remove Boxes' problem on LeetCode.
Full Experience
During my online assessment for DealShare, I faced two distinct coding challenges. The first problem, which I initially approached with brute force, resulted in a Time Limit Exceeded error. I found that a Trie-based solution was accepted as the optimal approach. The second question immediately reminded me of the 'Remove Boxes' problem often found on LeetCode. I've shared the problem statements as images for reference.
Interview Questions (2)
The first problem involved processing strings where a naive brute-force method proved inefficient, leading to a Time Limit Exceeded error. The optimal solution required leveraging a Trie data structure for efficient operations, suggesting a problem related to prefix searching, dictionary lookups, or similar string-based operations.
This problem was highly similar to the LeetCode problem 'Remove Boxes' (LeetCode 546). It likely involved a game or puzzle where one must strategically remove contiguous groups of boxes of the same 'color' or value to maximize a score, typically where removing 'k' boxes yields 'k*k' points. This class of problems usually points towards a dynamic programming approach.