Tip 1 : Practise medium and hard on leetcode
Tip 2 : Give mock interviews
Tip 1 : Have at least 2 projects on resume
Tip 2 : Do at least 1 internship before placement

1. It can be divided into 'K' contiguous substrings such that the first letter of these substrings is the same for all the substrings.
2. It can be divided into 'K' contiguous substrings such that the first letter of these substrings is distinct for all the substrings.
Let 'N' = 6, 'K' = 2, 'S' = "pppdpa".
It can be divided into "pp" and "pdpa", the first letter of the strings is same.
It can be divided into "ppp" and "dpa", the first letter of the strings is distinct.
So our answer is 1.



You are given, ‘ARR’ =[4, 3, 5, 1, 4, 5], and ‘K’ = 5. In the given array the pair sums divisible by ‘K’ are [4,1], [5, 5], [4, 1]. Since there are a total of 3 pairs, the answer is 3.






3 2 2
5 6 6
9 5 11
In the given matrix, 3 → 5 → 6 and 3 → 5 → 9 form increasing paths of length 3 each.



For the given binary tree:

Subtree with the largest sum is highlighted in the above image. The sum is (-2 + 4 + 7) = 9

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?