FastPrepAdd Numbers Stored in Four-Digit Chunks
Problems/Add Numbers Stored in Four-Digit Chunks

Add Numbers Stored in Four-Digit Chunks

ZipRecruiter logoZipRecruiter● MediumNEW GRADONSITE INTERVIEW

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A ZipRecruiter onsite report preserves linked-list numbers whose nodes store four-digit blocks, leading-zero interpretation within a block, and addition. Arrays model the linked lists for execution; direction, normalization, and zero representation are supplied, for an approximate 86% source match.

Each array represents one nonnegative integer as base-10000 chunks in most-significant-first order. Every chunk is between 0 and 9999; conceptual leading zeroes inside a chunk are allowed.

Add the represented numbers and return normalized base-10000 chunks in the same order. Return [0] for zero and omit other leading zero chunks.

Function

addChunkedNumbers(first: int[], second: int[]) → int[]

Examples

Example 1

first = [1,9999]second = [2]return = [2,1]

9999 plus 2 produces a carry into the preceding chunk.

Example 2

first = [12,34]second = [5,6,7]return = [5,18,41]

Missing high chunks are treated as zero.

Constraints

  • 1 <= first.length, second.length <= 100000
  • 0 <= chunk < 10000

More ZipRecruiter Onsite Interview questions

  • Restaurant Vote LeadersPHONE SCREEN · ONSITE INTERVIEW · Seen Feb 2026
  • Sliding Window Rate LimiterOA · ONSITE INTERVIEW · Seen Oct 2022
  • Sort an Integer Array in Ascending OrderOA · ONSITE INTERVIEW · Seen Apr 2022
  • Classify an Alien Dictionary OrderingPHONE SCREEN · ONSITE INTERVIEW · Seen Mar 2022
  • Add Two Numeric Strings with CarryONSITE INTERVIEW · Seen Nov 2021
  • Expand Decimal Digits into Runs of OnesONSITE INTERVIEW · Seen Nov 2021
  • Solve a Sudoku BoardONSITE INTERVIEW · Seen Aug 2021
  • Validate a Sudoku BoardONSITE INTERVIEW · Seen Aug 2021
  • Iterate Ragged Integer Lists VerticallyONSITE INTERVIEW · Seen May 2017
  • Min StackONSITE INTERVIEW · Seen Feb 2017

Similar questions at other companies

  • Add Two Numbers IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Subtract Forward-Order Linked-List NumbersMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Add Two Numbers Stored in Reversed ListsExpedia · ONSITE INTERVIEWExpedia interview questions
  • Add Two Numbers Stored as Linked ListsCapital One · ONSITE INTERVIEWCapital One interview questions
  • Add Forward Linked-List Numbers Using RecursionPeopleStrong · PHONE SCREENPeopleStrong interview questions
  • Add NumbersCisco · OACisco interview questions
  • Binary Linked List to DecimalJP Morgan Chase · OAJP Morgan Chase interview questions
  • LRU Cache for Query ResultsAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • LRU CacheServiceNow · PHONE SCREEN · ONSITE INTERVIEWServiceNow interview questions
  • Integers With Multiple Sum of Two CubesCharta Health · PHONE SCREEN · ONSITE INTERVIEWCharta Health interview questions

ZipRecruiter interview experiences

  • ZipRecruiter SWE OA, Level Not Reported: 23 Experiences
  • ZipRecruiter SWE Intern OA Scores: 4 Experiences
  • ZipRecruiter SWE New Grad OA: 9 Experiences
All ZipRecruiter interview questionsSee ZipRecruiter hiring insights
Saved
class Solution {
    public int[] addChunkedNumbers(int[] first, int[] second) {
        // Write your code here.
    }

}
Checking account…