Kefa and First Steps Problem
Kefa and First Steps Problem — ExecCode Medium DSA Practice
Solve the Kefa and First Steps problem on ExecCode. Free online medium DSA practice in Two Pointers. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Given an array of integers nums, return the length of the longest contiguous subarray in which every element is less than or equal to the next one. Equal neighbors count. You cannot skip elements. Return the longest non-decreasing length. You are given: nums — nums Return the longest non-decreasing length. Copied from OA Lab Part 1.
Examples
Input {'nums': [1, 2, 3]}; Output 3. Input {'nums': [1]}; Output 1. Input {'nums': [3, 2, 1]}; Output 1
Constraints
Follow the statement. Use a 64-bit integer when values can overflow.
Practice Kefa and First Steps free on ExecCode. Browse DSA problems, topic map, and placement guides.