Software
Interview Date
13-08-2026
Result
Rejected
Difficulty
Easy
Rounds
01
Drive Type
Off-Campus
Topics asked
Detailed experience
# 1. Median of Two Sorted Arrays ## Problem Statement Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median of the two sorted arrays. The overall run time complexity should be `O(log (m+n))`. ## Constraints `nums1.length == m` `nums2.length == n` `0 <= m <= 1000` `0 <= n <= 1000` `1 <= m + n <= 2000` `-10^6 <= nums1[i], nums2[i] <= 10^6` ## Test Cases Test Case 1:** *Input:** `nums1 = [1,3]`, `nums2 = [2]` *Output:** `2.00000` *Explanation:** merged array = [1,2,3] and median is 2. Test Case 2:** *Input:** `nums1 = [1,2]`, `nums2 = [3,4]` *Output:** `2.50000` *Explanation:** merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5. - # 2. Burst Balloons ## Problem Statement You are given `n` balloons, indexed from `0` to `n - 1`. Each balloon is painted with a number on it represented by an array `nums`. You are asked to burst all the balloons. If you burst the `i`-th balloon, you will get `nums[i - 1] * nums[i] * nums[i + 1]` coins. If `i - 1` or `i + 1` goes out of bounds of the array, then treat it as if there is a balloon with a `1` painted on it. Return the maximum coins you can collect by bursting the balloons wisely. ## Constraints `n == nums.length` `1 <= n <= 300` `0 <= nums[i] <= 100` ## Test Cases Test Case 1:** *Input:** `nums = [3,1,5,8]` *Output:** `167` *Explanation:** nums = [3,1,5,8] --> [3,5,8] --> [3,8] --> [8] --> [] coins = 3*1*5 + 3*5*8 + 1*3*8 + 1*8*1 = 15 + 120 + 24 + 8 = 167 Test Case 2:** *Input:** `nums = [1,5]` *Output:** `10` *Explanation:** nums = [1,5] --> [5] --> [] coins = 1*1*5 + 1*5*1 = 5 + 5 = 10