FastPrepLarge Responses
Problems/Large Responses

Large Responses

Postman logoPostman● EasyFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Postman online assessment. The images in the report describe a task that works with a file. Here, we give you the log records directly. The parsing and the counting stay the same. Our version is about 97% the same as the reported question.

You are given Apache-style HTTP log records in records. Each non-empty record ends with a nonnegative integer giving the number of response bytes.

A response is large when it contains more than 5000 bytes. Return a two-element array:

  1. the number of large responses;
  2. the total bytes sent by all large responses.

The request portion may contain spaces and is enclosed in double quotes, so parse the byte count from the final whitespace-separated field.

Function

summarizeLargeResponses(records: String[]) → long[]

Examples

Example 1

records = ["unicom96.unicomp.net - - [01/Jul/1995:00:00:06 -0400] \"GET /shuttle/countdown/ HTTP/1.0\" 200 3985","unicom96.unicomp.net - - [01/Jul/1995:00:00:14 -0400] \"GET /shuttle/countdown/count.gif HTTP/1.0\" 200 40310","d104.aa.net - - [01/Jul/1995:00:00:15 -0400] \"GET /shuttle/countdown/count.gif HTTP/1.0\" 200 40310"]return = [2,80620]

Two records have more than 5000 bytes. Their byte counts sum to 40310 + 40310 = 80620.

Example 2

records = ["host - - [time] \"GET /a HTTP/1.0\" 200 5000","host - - [time] \"GET /b HTTP/1.0\" 200 5001"]return = [1,5001]

A response of exactly 5000 bytes is not large; only the 5001-byte response qualifies.

Constraints

  • 2 ≤ records.length ≤ 10^5
  • Every non-empty record ends with a valid nonnegative byte count.
  • The total bytes across all large responses does not exceed 10^14.

More Postman interview questions

  • Configuration SystemOA · Seen Sep 2020
  • Minimum Swaps to Sort an ArrayOA · Seen Aug 2020
  • Validate IP AddressOA · Seen Aug 2020
  • Without WhitespacesOA · Seen Sep 2019
  • Maximum Laptop Rating in a Price RangeOA · Seen Aug 2019
  • Group Duplicate Files by ContentONSITE INTERVIEW · Seen Feb 2026
  • Encode and Decode a String StreamONSITE INTERVIEW · Seen May 2024

Similar questions at other companies

  • Highest-Ranked University by CountryAgoda · OAAgoda interview questions
  • Incident MonitorStripe · OAStripe interview questions
  • Correct Apartment Bedroom CountsRamp · OARamp interview questions
  • Message Latencies from CSV LogsAmazon · ONSITE INTERVIEW
  • Most Cost-Effective MachineCapital One · ONSITE INTERVIEWCapital One interview questions
  • Flatten a Mixed JSON ListNike, Inc. · ONSITE INTERVIEWNike, Inc. interview questions
  • Query Log MatchDatadog · PHONE SCREEN · ONSITE INTERVIEWDatadog interview questions
  • Insert an Employee into an Organization HierarchyWaymo · PHONE SCREENWaymo interview questions
  • Machine Message RouterOpenAI · PHONE SCREENOpenAI interview questions
  • Parse and Order Structured LogsCoinbase · ONSITE INTERVIEWCoinbase interview questions
All Postman interview questionsSee Postman hiring insights
Saved
class Solution {
    public long[] summarizeLargeResponses(String[] records) {
        // write your code here
    }
}
Checking account…