As reported: Goldman Sachs rounds (2025–2026): the CoderPad round of an Associate loop (one interviewer, straight into DSA), a coding round for an SDE Analyst role in the USA (with the High Five problem), and a Superday data-structures round for an Analyst (with Longest Substring Without Repeating Characters).
Given two sorted arrays nums1 (length m) and nums2 (length n), return the median of all m + n numbers in O(log(m + n)) time.
This is LeetCode 4 — Median of Two Sorted Arrays.
Example 1
nums1 = [1,3], nums2 = [2]
-> 2.00000
Example 2
nums1 = [1,2], nums2 = [3,4]
-> 2.50000
Constraints: 0 ≤ m, n ≤ 1000; 1 ≤ m + n ≤ 2000; -10^6 ≤ values ≤ 10^6.
Code runner format: one JSON value per line: nums1, then nums2 (LeetCode's test-case format). Implement findMedianSortedArrays(nums1, nums2); the harness prints the result as JSON.