GeeksforGeeks » Interview Questions
Microsoft Interview Question for Software Testing (2-5 Years) about Data Structure
(2 posts)-
Given a input text file, write a program to print the output as follows:
word\t<No of times the word appears in the file>\t<List of lines the word appears>
-
Make use of TRIE data structure.
Take a variable in the structure to keep track of number of times a word appears in file.
Take an array in the structure to keep track of the line numbers.
Reply
You must log in to post.