1. Easy SQL Problem
Solve an easy SQL problem. Provide the SQL query you would use and explain your reasoning.
2. SQL vs NoSQL
Discuss the differences between SQL and NoSQL databases. What are the advantages and disadvantages of each, and in what scenarios would you choose one over the other?
3. Normalize a JSON-like Structure
Write a function to normalize all numerical values within a JSON-like structure. The function should traverse the structure and normalize numerical values found within.
4. Find Subarray Start Intervals of Ones
Write a function that takes an array containing only 0s and 1s, and returns the start and end indices of subarrays that contain only 1s. For example, given [0, 0, 0, 1, 1, 1, 0, 0, 1], the function should return [(3, 6), (8, 9)].
5. Calculate Differences Between Consecutive Elements
Write a function that takes an array of integers and returns an array of differences between consecutive elements. For example, given [1, 2, 6, 4, 7], the function should return [1, 4, -2, 3]. For the follow-up, discuss how you would handle the case where the input array is infinite.