Question 4

Suppose you have an input character stream (StreamReader) and you have a list of pattens like ABCAS, ASGKT. KHTSD etc. You need to read the stream one by one character and you need to keep count on number of each pattern found so far and when EOF occures just print all the patterns along with count.


Input String: 011100010

Pattern 1: 011

Pattern 2: 010


011 => 1

010 => 1

[advanced_iframe securitykey=”undefined” src=”” width=”100%” height=”600″]

Register for the new batch at KodNest and start your journey to success.Secure Your Spot Now!Claim Your Seat

Request A Callback

Get a Free 30-minute Counseling session with our experts.