FastPrepMedian of Parsed Integer Strings
Problems/Median of Parsed Integer Strings

Median of Parsed Integer Strings

Rippling logoRippling● EasyNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Rippling new grad phone screen. The report keeps the task of finding the median of a parsed list, a talk about complexity, and a follow-up with a dictionary. It does not keep the format of the elements, the interface, examples, limits, or what to do for an even size. Our version is about 40% the same as the reported question.

You are given a nonempty array values of integers written as strings, each in the one standard base-10 form: a minus sign for negatives, no leading zeros, no plus sign. Turn every string into a number and return the median as a double.

Keep duplicates. If the number of values is odd, the median is the middle value after sorting. If it is even, the median is the average of the two middle values.

Dictionary follow-up

Once the direct version works, explain or write a second way to get the same answer. Use a dictionary that maps each parsed integer to how many times it appears. Find the median positions by walking through the keys in increasing numeric order.

Function

parsedMedian(values: String[]) → double

Examples

Example 1

values = ["10","2","7"]return = 7.0

Parsing and sorting gives [2, 7, 10]. The single middle value is 7.

Example 2

values = ["-5","20","3","8"]return = 5.5

The sorted values are [-5, 3, 8, 20]. The two middle values are 3 and 8, so the median is (3 + 8) / 2 = 5.5.

Example 3

values = ["4","4","4","9","12","12"]return = 6.5

Duplicates remain in the multiset. The middle positions contain 4 and 9, whose arithmetic mean is 6.5.

Constraints

  • 1 <= values.length <= 2 * 10^5.
  • Every values[i] is the canonical base-10 representation of an integer in [-10^4, 10^4].
  • Zero is written as "0"; nonzero values have no leading zeros, and positive values have no leading plus sign.

More Rippling Phone Screen questions

  • Filter, Sort, and Deduplicate Scheduled TasksPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Stateful Log Transform and SearchPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Dependency-Aware Task SchedulerPHONE SCREEN · Seen Nov 2026
  • Delivery Cost Tracker with Effective-Dated RatesPHONE SCREEN · Seen Nov 2026
  • Camel CardsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Best and Worst Camel Card CompletionsPHONE SCREEN · Seen Nov 2026
  • Corporate Card Expense RulesOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • In-Memory Priority Task SchedulerPHONE SCREEN · Seen Oct 2026
  • Limit an Organization Tree's HeightPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Median Across N Sorted ArraysPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Employee Count Median, Mean and ModeClay · PHONE SCREEN
  • Text Embedding and Vector SearchNike, Inc. · PHONE SCREEN · ONSITE INTERVIEWNike, Inc. interview questions
  • Find Accounts with Negative Converted BalancesStripe · PHONE SCREENStripe interview questions
  • Numbers With Exactly Two Square-Sum RepresentationsGoogle · PHONE SCREENGoogle interview questions
  • Implement k-Nearest NeighborsApple · PHONE SCREENApple interview questions
  • Net Position Calculation from API SnapshotsHeadlands Technologies · ONSITE INTERVIEWHeadlands Technologies interview questions
  • House ValuationIMC Trading · OAIMC Trading interview questions
  • Config Store with Priority OverridesMicrosoft · PHONE SCREENMicrosoft interview questions
  • Majority ElementByteDance · PHONE SCREENByteDance interview questions
  • Recommend Films from Viewers Who Watched Everything You DidBloomberg LP · PHONE SCREENBloomberg LP interview questions

Interview reports that mention this question

  • Rippling Intern Phone Screens: 28 Experiences (Part 3 of 5)
  • Rippling SWE Intern Interviews: 101 Experiences (Part 1 of 5)

Rippling interview experiences

  • Rippling Senior SWE Full Loop Questions: 1 Experience
  • Rippling Experienced SWE Phone Screens: 2 Experiences
  • Rippling Design Rounds and Onsites: 17 Experiences (Part 3 of 3)
  • Rippling Phone Coding Screens: 14 Experiences (Part 2 of 3)
All Rippling interview questionsSee Rippling hiring insights
Saved
class Solution {
    public double parsedMedian(String[] values) {
        // Write your code here.
    }
}
Checking account…