COL106: Assignment 5

Due Date : April 15, 2019

Pattern Matching with wildcards

In this assignment, you will learn to implement suffix trees and use them for pattern matching. You are given a long text T containing English characters, numbers (and other special characters like blank, etc.). Given a string P, you have to find ALL occurences of P in T, i.e., you have to mention the locations in T where P occurs. Recall that we say P occurs in T if there is a sequence of consecutive characters in T which is same as P. To make your program more powerful, the pattern can contain the following wildcards : You can assume for the sake of simplicity that P contains at most one * character. You can also assume that T does not contain the characters * and ?. Your implementation should be as efficient as possible. Details about input format and deliverables are here .