1. What is normalization?
2. Distinct Subsequences Problem Statement You are given a string 'S' of length 'N' which may include duplicate alphabets. Your goal is to calculate the number of distinct subsequences in the string. Example: Input: "S" = "deed" Output: 11 Explanation: The possible subsequences are {""}, {"d"}, {"e"}, {"de"}, {"e"}, {"de"}, {"ee"}, {"dee"}, {"d"}, {"dd"}, {"ed"}, {"ded"}, {"ed"}, {"ded"}, {"eed"} and {"deed"}. After filtering duplicates, the distinct subsequences are: {""}, {"d"}, {"e"}, {"de"}, {"ee"}, {"dee"}, {"dd"}, {"ed"}, {"ded"}, {"eed"}, {"deed"}, resulting in 11 distinct subsequences. Input: The first line contains an integer 'T' denoting the number of test cases. Each of the following T lines contains a single string 'S'. Output: For each test case, output the count of distinct subsequences, modulo 109 + 7, on a new line. Constraints: 1 <= T <= 10 1 <= N <= 104 Note: The answer might be large, so return it modulo 109 + 7.
3. Maximum Subarray Sum Problem Statement Given an array arr of length N consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays. Explanation: A subarray is a contiguous segment of an array, meaning it can be formed by removing 0 or more integers from the start, and 0 or more integers from the end of the array. Input: Narr[0] arr[1] ... arr[N-1] Output: The sum of the maximum subarray. Example: Input: N = 5arr = [-2, 1, -3, 4, -1] Output: 4 Explanation: The maximum subarray sum is obtained by the subarray [4] which has the sum 4. Constraints: 1 <= N <= 10^6 -10^6 <= arr[i] <= 10^6 Note: The sum of an empty subarray is considered 0.
4. Write code to take a screenshot of a webpage.
5. Why is inheritance used in projects?