Cognizant Python Technical Cluster | Recent OA Feb 2026 | Athlete's Altitude Readings | Array Manipulation & Segment Splitting

Cognizant · Question · Posted Mar 2026

Question: Athlete's Altitude Readings (Maximal Non-Decreasing Runs) Problem Statement: You are charting an athlete's altitude readings during a jog, represented by R. It is stored in an integer array A where the route naturally forms plateaus where altitude never decreases for a while and then drops. You have to split array A into maximal non-decreasing runs (plateaus). For each plateau, add the (last - first) value of that run to a total. Your task is to find and return an ...

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

Log in Create a free account