Problem Statement: You are given a string str of length n. Your task is to find and print the maximum integer present in the string str. An integer is defined as a sequence of digits.
Note:
Print -1 if no integer is found.
If the string is empty, print -2.
Input Format: The input consists of two lines:
The first line contains an integer, i.e., n.
The second line contains the string str.
Output Format: Print the maximum integer present in the string str.
Question 2: Product Sentiment
Problem Statement: You are given a set of customer reviews for a specific product. Each review contains feedback from a customer, with certain words that indicate positive or negative sentiment. Your task is to analyze all the reviews collectively to classify the overall sentiment for the product. Based on this classification, the product will be labeled as either a Good Product or a Bad Product.
A review of the product will be Positive if it contains MORE positive words than negative words, otherwise Negative.
Overall sentiment of the product will be Positive if it has MORE positive reviews than negative reviews, otherwise Negative.
Write a function that returns "Good Product" or "Bad Product".