Answer: AVAIL FINANCE | Campus Interview Question | On-Campus OA (2025)

Answer · Posted Jun 2026

Approach Split the sentence into individual tokens. Maintain a variable prev initialized to -1. Traverse each token: If it is a number: Convert it into an integer. Compare it with prev. If it is not greater than prev, return false. Otherwise, update prev. If all numbers satisfy the condition, return true. Strategy Process the sentence from left to right. Ignore words and only evaluate numeric tokens. Keep track of the previous number to ensure strict ascending order. Java Code class ...

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

Log in Create a free account