FastPrepLatest Top 100 News Stories
Problems/Latest Top 100 News Stories

Latest Top 100 News Stories

Bloomberg LP logoBloomberg LP● MediumNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported as a class and data-structure exercise in a firsthand Bloomberg new-grad phone screen in 2018. Timestamps record the history of each story, so the top-100 list always comes out the same way.

Given storyIds and updatedAt, return up to 100 story IDs, ordered from newest to oldest.

storyIds[i] is a unique story's ID, and updatedAt[i] is its latest history timestamp.

For equal timestamps, put IDs in lexicographic order: at the first character where two IDs differ, the smaller character comes first, and an ID that is the start of a longer one comes first.

Function

latestStories(storyIds: String[], updatedAt: long[]) → String[]

Examples

Example 1

storyIds = ["b","a","c"]updatedAt = [5,5,7]return = ["c","a","b"]

c has the latest timestamp, so it comes first. a and b have equal timestamps, and a comes before b in lexicographic order.

Constraints

  • Arrays have equal length.
  • IDs are unique.
  • At most 10^5 stories.

More Bloomberg LP Phone Screen questions

  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE 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
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Sparse Vector and Matrix OperationsPHONE SCREEN · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026

Similar questions at other companies

  • Streaming Median of Trade PricesXantium · PHONE SCREEN
  • Top K Pins with Insert and QueryPinterest · PHONE SCREENPinterest interview questions
  • Alert Engine with a Repeat IntervalChronosphere · PHONE SCREEN
  • Worst-Performing Ads by CTR in a Campaign TreeUber · PHONE SCREENUber interview questions
  • Find Median from Data StreamSusquehanna International Group (SIG) · PHONE SCREENSusquehanna International Group (SIG) interview questions
  • Find Median from Data StreamAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Find Median from Data StreamXPeng Motors · PHONE SCREEN
  • Median of a Number StreamAdobe · PHONE SCREENAdobe interview questions
  • Top K Largest Values from a StreamThe D.E. Shaw Group · ONSITE INTERVIEWThe D.E. Shaw Group interview questions
  • Fixed-K Kth Largest StreamAmazon Web Services · ONSITE INTERVIEWAmazon Web Services interview questions

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)
  • Bloomberg Experienced SWE Interviews: 167 Questions (Part 1 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public String[] latestStories(String[] storyIds, long[] updatedAt) {
      // Write your code here.
    }
}
Checking account…