FastPrepFirst Strict Local Minimum
Problems/First Strict Local Minimum

First Strict Local Minimum

ZipRecruiter logoZipRecruiter● EasyFULLTIMENEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Two ZipRecruiter OA reports describe the first interior value strictly below both neighbors. The stronger report also keeps the -1 marker and examples. One report has no employment label, so this record keeps both the clear new-grad evidence and the full-time default. We supplied limits and a function signature.

You are given an integer array numbers. Inspect only positions that have both a left and a right neighbor.

Return the smallest index i such that numbers[i] is strictly less than both numbers[i - 1] and numbers[i + 1]. Return -1 if no such index exists.

Function

firstStrictLocalMinimum(numbers: int[]) → int

Examples

Example 1

numbers = [1,2,3,4]return = -1

No interior value is smaller than both neighbors.

Example 2

numbers = [1,3,1,2,5]return = 2

At index 2, value 1 is less than 3 and 2; it is the first qualifying index.

Constraints

  • 0 <= numbers.length <= 100000
  • -1000000000 <= numbers[i] <= 1000000000

More ZipRecruiter Online Assessment questions

  • Four-Level Banking System with Scheduled PaymentsOA · Seen Oct 2026
  • Count Three-Digit Numbers with Distinct DigitsOA · Seen Oct 2024
  • Longest Frequency-Bounded SubarrayOA · Seen Oct 2024
  • Minimum Changes to Draw a YOA · Seen Oct 2024
  • Apply Binary State OperationsOA · Seen Sep 2024
  • Simulate Orchard Rot SpreadOA · Seen Sep 2024
  • Compare Odd- and Even-Index SumsOA · Seen Sep 2024
  • Coordinate Removals with Column GravityOA · Seen Sep 2024
  • Lexicographically Smallest End ReversalOA · Seen Sep 2024
  • Recursively Expanded Shell Command CountsOA · Seen Sep 2024

Similar questions at other companies

  • Catch Fish with Reusable BaitsSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Book Reading EveningsGoogle · OAGoogle interview questions
  • Basic Item DiscountsPalantir · OAPalantir interview questions
  • Wind-Blown Leaves Remaining in a GridAbridge · OAAbridge interview questions
  • Lift Total TravelInfosys · OAInfosys interview questions
  • Shell Command Counts with History ReferencesTikTok · OATikTok interview questions
  • Count Dropped RequestsJP Morgan Chase · OAJP Morgan Chase interview questions
  • Recursively Expanded Shell Command CountsHudson River Trading · OAHudson River Trading interview questions
  • Diagonal Bounce TraversalAutodesk · OAAutodesk interview questions
  • First Value Below Both NeighborsCapital One · OACapital One interview questions

ZipRecruiter interview experiences

  • ZipRecruiter SWE OA, Level Not Reported: 23 Experiences
  • ZipRecruiter SWE Intern OA Scores: 4 Experiences
  • ZipRecruiter SWE New Grad OA: 9 Experiences
All ZipRecruiter interview questionsSee ZipRecruiter hiring insights
Saved
class Solution {
    public int firstStrictLocalMinimum(int[] numbers) {
        // Write your code here.
    }

}
Checking account…