Here you can know about various algorithms used in Competitive Programming to increase your problem solving ability.
Leetcode: https://leetcode.com/problemset/all/
Hackerrank: https://www.hackerrank.com
Codeforces: https://codeforces.com/problemset
Codechef: https://www.codechef.com/practice?page=0&limit=20&sort_by=difficulty_rating&sort_order=asc&search=&start_rating=0&end_rating=999&topic=&tags=&group=all
-
Subarray and Subsequence
A subarray is a contiguous part of array. An array that is inside another array.
For example, consider the array [1, 2, 3, 4], there are 10 non-empty sub-arrays. The subarrays are (1), (2), (3), (4), (1, 2), (2, 3), (3, 4), (1, 2, 3), (2, 3, 4) and (1, 2, 3, 4).A subsequence is a sequence that can be derived from another sequence by removing zero or more elements, without changing the order of the remaining elements.
For example, consider the array [1, 2, 3, 4], there are 15 sub-sequences. The subsequences are (1), (2), (3), (4), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4), (1, 2, 3), (1, 2, 4), (1, 3, 4), (2, 3, 4) and (1, 2, 3, 4).