Hi Leetcode Community,
Today I participated in the Round-2 (CoderPad) interview, where I was presented with two coding problems: one easy and one Leetcode hard problem, to be solved within 1 hour.
Problem 1: Given a string, return the first non-repeating character. (Simple Problem)
Problem 2: Find the Median of Two Sorted Arrays
I elaborated on three different approaches to solve the second problem:
First Approach: Create a new array by merging the elements from both arrays, then sort the new array and find the median.
Second Approach: Utilize two pointers, one for each array, to create a sorted array, and then determine the median.
Third Approach: Apply a binary search algorithm.
Waiting for the next round interview call:)