โ† ServiceNow questions

Median of 2 sorted arrays in O(log N) time and O(1) space

Filed under ServiceNow

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The solution must run in O(log(min(m, n))) time.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related ServiceNow questions

Collected from public candidate posts and coding forums. Updated Nov 2026.