Showing 10 questions
You are given two sorted integer arrays. Merge the second array into the first one, maintaining the sorted order.
#1. Merge Sorted Array
You're given two sorted lists. Combine them into a single sorted list containing all elements from both original lists.
#2. Merge Two Sorted Lists
You are given a collection of intervals. Merge all overlapping intervals into a single interval and return the result.
#3. Merge Intervals
Find two numbers in a given array that add up to a specific target value, and return their indices. Essentially, you need to efficiently locate the pair that satisfies the sum requirement.
#4. Two Sum
Find the substring that occurs the most within a given string, subject to length and character limit constraints. Return the maximum number of times this substring appears.
#5. Maximum Number of Occurrences of a Substring
In a group of people, find the "celebrity": someone who is known by everyone else, but doesn't know anyone themselves. You are given a way to query whether two people know each other.
#6. Find the Celebrity
You are given a list of meeting time intervals. Determine the minimum number of conference rooms required to accommodate all the meetings without any overlap.
#7. Meeting Rooms II
You are given k sorted lists. Combine all of their elements into a single sorted list and return it.
#8. Merge k Sorted Lists
Find the k most frequent elements in a given array of numbers. Return the top k elements based on their frequency.
#9. Top K Frequent Elements
You are given an array of numbers and an integer 'k'. Find the k-th largest sum of all possible subsequences of the given array.
#10. Find the K-Sum of an Array