Combine Two Index Sequences
Updated
Problem statement
You are given two finite index sequences, first and second. Return their concatenation: every value of first in its original order followed by every value of second in its original order.
Do not sort, merge, or remove duplicates. Either sequence may be empty.
Function
combineIndexSequences(first: int[], second: int[]) → int[]Examples
Example 1
first = [0,2,4]second = [1,3]return = [0,2,4,1,3]The first sequence is followed by the second without reordering.
Example 2
first = []second = [5,6]return = [5,6]Only the second sequence contributes values.
Example 3
first = [7,8]second = []return = [7,8]Only the first sequence contributes values.
Constraints
0 <= first.length, second.length <= 200000.first.length + second.length <= 200000.- Every value is a signed 32-bit integer.
More Squarepoint Capital Phone Screen questions
- Lazy Filter over a GeneratorPHONE SCREEN · Seen Nov 2026
- Moving Average of a Data StreamPHONE SCREEN · Seen Nov 2026
- Newton Square Root to a Guaranteed TolerancePHONE SCREEN · Seen Nov 2026
- Probability of Consecutive HeadsPHONE SCREEN · Seen Nov 2026
- Three Points in a Semicircle: Monte Carlo EstimatePHONE SCREEN · Seen Nov 2026
- Parse, Normalize, and Combine PolynomialsPHONE SCREEN · Seen Aug 2026
- Sorted Insertion SnapshotsPHONE SCREEN · Seen Aug 2026
- Strong and Weak Reference LifecyclePHONE SCREEN · Seen Aug 2026
- Target Sum Across Two Sorted ArraysPHONE SCREEN · Seen Aug 2026
- Classify Heap Addresses from a Memory SnapshotPHONE SCREEN · Seen Nov 2025
Similar questions at other companies
- Automation Pipeline, Part 1: Single WorkerPlaid · PHONE SCREENPlaid interview questions
- Search and Format ContactsAdyen · PHONE SCREENAdyen interview questions
- Array-Backed Set Without Library CollectionsOde with Anthropic · PHONE SCREEN
- Paginate Retained Conversation HistorySierra · PHONE SCREENSierra interview questions
- Validate a Chess Bishop, Rook, or Queen MoveGlean · PHONE SCREENGlean interview questions
- Count Distinct Underwriting PII ValuesAffirm · PHONE SCREEN · ONSITE INTERVIEWAffirm interview questions
- Apply Affine Array TransformationsByteDance · PHONE SCREENByteDance interview questions
- Match a Variadic Function SignatureConfluent · PHONE SCREENConfluent interview questions
- Bounded IPv4 FilterAmazon · PHONE SCREEN
- Partition and Group Values by ParityEPAM · PHONE SCREENEPAM interview questions