Create a list of N random numbers (Integer) and put them into a list and sort the list using the List’s sort method. Randomly select a number from the list. Find the position of the number in the list using binary search and record the number of comparison that you have to make (c). Then plot c against N for N = 30, 50, 75, 100, 150, 200, 300, 400, and 500.
Implement the KMP algorithm from scratch. Test it and plot c against n and m where n is the size of the text and m is the size of the pattern, for different values of n and m.
Implement the Boyer Moore algorithm from scratch. Test it and plot c against n and m where n is the size of the text and m is the size of the pattern, for different values of n and m.
Implement the Z algorithm from scratch. Test it and plot c against n and m where n is the size of the text and m is the size of the pattern, for different values of n and m.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here