FastPrepNext Greater Element in a Circular Array
Problems/Next Greater Element in a Circular Array

Next Greater Element in a Circular Array

Bloomberg LP logoBloomberg LP● MediumNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report names a well-known problem as the base of a Bloomberg phone-screen variant, but it does not say what the variant changes. We used the standard circular Next Greater Element II. Our version is about 65% the same as the reported question.

Given a circular integer array, return the next greater value for every position. The next greater value is the first strictly larger value encountered while moving forward, wrapping from the end of the array to the beginning.

If no strictly greater value exists for a position, return -1 there.

Function

nextGreaterElements(nums: int[]) → int[]

Examples

Example 1

nums = [1,2,1]return = [2,-1,2]

The last position wraps around and finds 2; the value 2 has no greater value.

Example 2

nums = [3,8,4,1,2]return = [8,-1,8,2,3]

Values near the end may find their answer after wrapping to the beginning.

Constraints

  • 1 <= nums.length <= 10^5
  • -10^9 <= nums[i] <= 10^9

More Bloomberg LP Phone Screen questions

  • Pascal's TrianglePHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Valid Triangle NumberPHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fewest Coins CombinationPHONE SCREEN · Seen Nov 2026
  • Recommend Films from Viewers Who Watched Everything You DidPHONE SCREEN · Seen Nov 2026
  • Track New Values in Sorted OrderPHONE SCREEN · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Generic Stack Operation SequenceArista Networks · PHONE SCREEN · ONSITE INTERVIEWArista Networks interview questions
  • Asteroid CollisionSiemens · PHONE SCREEN
  • Billing Log with Undo and RedoReddit · PHONE SCREENReddit interview questions
  • Compress Editor Actions into Operational Transform OperationsReplit · OA · PHONE SCREEN · ONSITE INTERVIEW
  • Daily TemperaturesCARS24 · PHONE SCREEN
  • Next Greater Indices and Maximum GapTikTok · PHONE SCREENTikTok interview questions
  • Next Greater Value in a Circular ArrayPayPay · PHONE SCREENPayPay interview questions
  • Stack with Constant-Time Middle QueriesAmazon · PHONE SCREEN
  • Recover the Stack After a WorkerCitadel · PHONE SCREENCitadel interview questions
  • Stock Span IFreshworks · PHONE SCREENFreshworks interview questions

Interview reports that mention this question

  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
  • Bloomberg New Grad OOD Follow-ups: 14 Experiences (Part 3 of 5)

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public int[] nextGreaterElements(int[] nums) {
        // Write your solution here.
    }

}
Checking account…