RECUR CLUB Hiring | Interview Question | Off-Campus OA (2023)

Question · Posted Jun 2026

Q1: Largest Odd Number in String Problem Statement You are given a numeric string num. Return the largest-valued odd integer that is a non-empty prefix of num. If no odd integer can be formed, return an empty string. A prefix is obtained by taking one or more characters from the beginning of the string. Example Input num = "52" Output 5 Explanation "52" is even. "5" is odd and is the largest odd prefix. Hence, the answer is "5". Constraints ...

The full answer & interview discussion are available to premium members.

Log in Create a free account