Given string str, return true string follows pattern anbn, i.e., it has a’s followed by b’s such that the number of a’s and b’s are same.
Examples:
Input : str = "aabb"
Output : Yes
Input : str = "abab"
Output : No
Input : str = "aabbb"
Output : No
Check if a string follows a^nb^n pattern or not: https://www.geeksforgeeks.org/check-string-follows-anbn-pattern-not/