SUBARRAY AND SUBSTRING PROBLEMS

CAN ANY ONE SUGGEST ME GOOD SUBARRAY ,SUBSTRING AND SUBSEQUENCE PROBLEMS FOR PRACTICE TO GET MYSELF GOOD AT THEM.

Here you go : -

1)https://www.geeksforgeeks.org/sum-of-all-subarrays/

2)https://www.geeksforgeeks.org/xor-subarray-xors/

3)https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/mathison-and-the-funny-substring-b3f58587/

3 Likes

What is difference between subarray and subsequence?
(is it that in subsequence sequence matters and in subarray sequence doesn’t matter or vice versa)?

Subarray is Contagious Part of an array
Substring is Contagious part of a string
Subseqence is Non-Contagious part of array or string.It is a sequence that can be generated from another sequence without changing order
For Further refer:-

1 Like