Tip 1 : Graph should be on your tips.
Tip 2 : while explaining the solution to interviewer, dont just hop onto the most optimal solution. Start with the brute force one, give the cons of brute force solution, and then go step by step till you reach the optimal solution.
Tip 3 : Improve on your communication skills as well.
Tip 1 : Mention only what is required for your profile, for e.g. do not stress too much on your co curricular stuff. Rather, try explaining more of your technical stuff that is relevant for your job.
Tip 2 : keep it limited to 1 page. And make sure its a pdf and not an image.



1. All four numbers should exist at different indices in the given array.
2. The answer is case-sensitive.



If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
The consecutive count of every character in the input string is less than or equal to 9.
I simply use string traversal and hashing to solve this problem.



Each product can cross the integer limits, so we should take modulo of the operation.
Take MOD = 10^9 + 7 to always stay in the limits.
Can you try solving the problem in O(1) space?
Create two arrays called left and right. In the left store the product of all the numbers before the number at the current index. In the right store the product of all numbers after the number at the current index.



If the input string is "abbc", then all the possible palindromic substrings would be: ["a", "b", "b", c", "bb"] and hence, the output will be 5 since we have 5 substrings in total which form a palindrome.
A string is said to be a 'Palindrome' if it is read the same forwards and backwards.
For example, “abba” is a palindrome, but “abbc” is not.
A 'Substring' is a contiguous sequence of characters within a string.
For example, "a", "b", "c", "ab", "bc", "abc" are substrings of "abc".
A palindromic substring is a contiguous sequence of characters within a given string that reads the same forwards and backwards. In other words, it is a substring that remains unchanged when its characters are reversed. For example, in the string "ABA", "A", "B", "A", "AB", "BA", and "ABA" are all palindromic substrings.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?