Given a 2D array, the task is to convert it into a 1D array by flattening it. Flattening means storing all the elements of the 2D array in a single linear structure (row/array) while preserving their original order. This tests understanding of array traversal, indexing, and data structure manipulation.
The task is to generate and print the Fibonacci series up to a given number of terms (e.g., the first 10 numbers). The Fibonacci series is a sequence where each number is the sum of the two preceding ones, starting with 0 and 1. This problem tests understanding of loops, conditionals, and basic algorithm design.
You are given a collection of intervals where each interval is defined by a start and end point (e.g., [1,3], [2,6], [8,10], [15,18]). The task is to merge all overlapping intervals and return a new set of non-overlapping intervals that cover the same ranges.
Example:
Input: [1,3], [2,6], [8,10], [15,18]
Output: [1,6], [8,10], [15,18]

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?