Practice Exercise 5.1

Source Code

import java.util.ArrayList;
import java.util.List;

public class NaiveStringMatching {
    public List<Integer> match(String P, String T) {
      // Write your code here 
      return null;
    }

    public static void main(String[] args) {
        NaiveStringMatching nsm = new NaiveStringMatching();
        List<Integer> matches = nsm.match("aab", "acaabc");
        for (Integer i : matches)
            System.out.println(i);
    }
}

Last updated