Tip 1: Speak clearly and try to explain whatever you are thinking when solving any coding problem.
Tip 2: Ask for help if you get stuck and clarify your doubts.
Tip 1: It should be short and crisp.
Tip 2: Avoid putting false info on your resume.



1. Both STR and PTR consist of English uppercase letters.
2. Length of string 'STR' will always be greater than or equal to the length of string ‘PTR’.
3. In case, there is no anagram substring, then return an empty sequence.
4. In case of more than one anagrams, return the indices in increasing order.



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?



• The given leaf node becomes the root after the inversion.
• For a node (say, ‘x’)
○ If there exists the left child that is not yet taken then this child must become the right child of ‘x’.
○ If the left child is already taken then the right child is still on the right side of ‘x’.
• The parent of ‘x’ must be the left child of ‘x’.

Consider the above binary tree (image- before inversion), if the given leaf node is ‘1’ then the binary tree after inversion becomes exactly the same as given in the image representing after inversion.
The given binary tree will only have distinct values of nodes.
Introduce yourself
What are your career goals?
What is your learning style?
What are your hobbies and interests?
What are your thoughts on the company's culture?
Tip 1 : Be yourself.
Tip 2 : Speak loudly and clearly.

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?