Company: Hashedin_3nov
Difficulty: medium
Find Most Recent Task with Keyword Problem Description A company keeps a record of daily tasks in the order they are added. Each task is a text description of an activity. At any given time, a query is made with a search keyword. Your job is to return the description of the most recent task (i.e. the one added last) that contains the given keyword as an exact substring. If no task contains the keyword, output "Not Found". No additional data structures beyond a simple list are required. Examples Example 1: Input: 5 Finish report Email team Schedule meeting Review code Fix bug Review Output: Review code Explanation: The list of tasks in order of addition is: "Finish report", "Email team", "Schedule meeting", "Review code", "Fix bug". Starting from the last task, "Fix bug" does not contain "Review". The next task backward is "Review code", which contains "Review". Hence, the output is "Review code". Example 2: Input: 3 Open door Close window Lock safe door Output: Open door Explanation: T