Question: High-Radius Coding Round | String Manipulation & Sentiment Analysis | Recent Online Assessment 2026 |
0
Entering edit mode

Question 1: Max Integer in String

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:

  1. The first line contains an integer, i.e., n.
  2. 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".

Keywords:

  • Positive Keywords: ["good", "excellent", "amazing", "love", "great", "satisfied", "happy"]
  • Negative Keywords: ["bad", "terrible", "disappointed", "poor", "hate", "unsatisfied", "awful"]

Input Format:

  • First line contains a single integer t, the number of test cases.
  • Each testcase consists of 2 parts:
    1. One integer n, the number of reviews.
    2. Next n lines containing each review per line.

Output Format:

t lines containing, each having overall review Good Product or a Bad Product.

Login before adding your answer.

Similar Posts
Loading Similar Posts