Company: Fedility_23march
Difficulty: medium
01. Consecutive Digits 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 derived by consecutive digit characters of string. Note: Print -1 if no integer is found. If string is empty then 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 . The input will be read from the STDIN by the candidate Output Format: Print the maximum integer present in the string str . Print -1 if no integer is found, if string is empty then print -2. The output will be matched to the candidate's output printed on the STDOUT Constraints: 1 ≤ n ≤ 100000. Example: Input: 39 33 milestone is either 12 or 75 km away Output: 75 Explanation: str have 3 integers '33', '12' and '75', since 75 is maximum, output is 75. Sample input 29 I have 8 500g packets of rice Sample Output 500 Instructions : Program should take input from sta