Question: I need help determining the best and worst case efficiency class for an algorithm I developed. Please note: I need to see the math and
I need help determining the best and worst case efficiency class for an algorithm I developed.
Please note: I need to see the math and all the steps involved, as I am not good at this and trying to learn. Also, the question I am seeking help with is posted elsewhere on chegg. Please do not copy your answer from elsewhere, as it will not help me and and I have already seen it.
here is the question:
2. Exercise 3.2.8 in the textbook: Consider the problem of counting, in a given text, the number of substrings that start with an A and end with a B. For example, there are four such substrings in CABAAXBYA. (a) Design a brute-force algorithm for this problem and determine its best-case and worst-case effciency in terms of 
Here is my psuedocode:

I am pretty sure it is in
worst case complexity and 1 best case complexity but I cant prove it, that is what I need help with.
please be detailed and show all steps. Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
