Back to problems

Design File Search Tool

Algorithm · Bloomberg · Easy

Design a command-line style search tool that locates a given word across multiple text files, performing the search in a case-insensitive manner. You are given a list of file data files, where each file is represented by its name and a list of its lines, along with a search word. Your tool must scan every file and find all occurrences of the word, ignoring case. For any file containing one or more matches, produce a result list where the first element is the filename, the…

Checking your access…