FastPrepMaximum Array Value
Problems/Maximum Array Value

Maximum Array Value

Sierra logoSierra● EasyFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Sierra online assessment. The report directly asks for the maximum value in an integer array. We chose the function signature for an integer array and set fixed input limits.

Given a non-empty array of integers nums, return the largest value in the array.

Function

maximumValue(nums: int[]) → int

Examples

Example 1

nums = [3,-2,7,4]return = 7

The largest value is 7.

Example 2

nums = [-8,-3,-11]return = -3

All values are negative, and -3 is the largest.

Constraints

  • 1 <= nums.length <= 100000
  • -1000000000 <= nums[i] <= 1000000000

More Sierra interview questions

  • Compact Conversation History by Token BudgetPHONE SCREEN · Seen Nov 2026
  • Paginate Retained Conversation HistoryPHONE SCREEN · Seen Nov 2026
  • Compact Conversations by Unique ListingsPHONE SCREEN · Seen Oct 2026
  • Markdown Header ChunksPHONE SCREEN · Seen May 2026

Similar questions at other companies

  • Closest NumbersHeadlands Technologies · OAHeadlands Technologies interview questions
  • Count Numbers Not Equal to the First TwoAirbnb · OAAirbnb interview questions
  • REST API: Country CodesHackerRank · OAHackerRank interview questions
  • Macaron Order with Set DiscountsShopify · OAShopify interview questions
  • Build the Task HierarchyPendo · OA
  • Lowest Number in an Open RangeCapital One · OACapital One interview questions
  • Missing IntervalsIBM · OAIBM interview questions
  • Total Cost Against the Lowest Earlier PricePayPal · OAPayPal interview questions
  • Count User Mentions in Chat MessagesRamp · OARamp interview questions
  • Count Valid Square PairsAuxoAI · OA
All Sierra interview questionsSee Sierra hiring insights
Saved
class Solution {
    public int maximumValue(int[] nums) {
        // Write your code here.
    }
}
Checking account…