GeeksforGeeks » Interview Questions

Microsoft Interview Question for Software Testing (2-5 Years) about Data Structure

(2 posts)
  • Started 9 months ago by Priyam
  • Latest reply from Aashish Barnwal
  1. Priyam
    guest
    Posted 9 months ago #

    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>

  2. Dedicated Programmer
    Member
    Posted 3 months ago #

    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.

RSS feed for this topic