Tip 1 : Practice around 300+ DSA questions .
Tip 2 : Always practice in coding contest.
Tip 3 : Practice in Hackathon for industry exposure.
Tip 1 : It should be of only 1 page with crisp and clear information.
Tip 2 : Always keep it updated such as CGPA and with recent projects.



The question was the slight variation or slight modification of 0-1 Knapsack.
The main crux of the question was to indentify that it was based on 01 knapsack.
After identifying the pattern, i solved it using recursion and then memoized my solution and it passed all the test cases.



Strings ‘STR’ and ‘PTR’ consist only of English uppercases.
Length of string ‘STR’ will always be greater than or equal to the length of string ‘PTR’.
The index is ‘0’ based.
In case, there is no anagram substring then return an empty sequence.
For example, the given ‘STR’ is ‘BACDGABCD’ and ‘PTR’ is ‘ABCD’. Indices are given
0-3 in ‘STR’ index 0,1,2,3 are ‘BACD’ and it is an anagram with ‘ABCD’
1-4 in ‘STR’ index 1,2,3,4 are ‘ACDG’ and it is not anagram with ‘ABCD’
2-5 in ‘STR’ index 2,3,4,5 are ‘CDGA’ and it is not anagram with ‘ABCD’
3-6 in ‘STR’ index 3,4,5,6 are ‘DGAB’ and it is not anagram with ‘ABCD’
4-7 in ‘STR’ index 4,5,6,7 are ‘GABC’ and it is not anagram with ‘ABCD’
5-8 in ‘STR’ index 5,6,7,8 are ‘ABCD’ and it is an anagram with ‘ABCD’
Hence there are 2 starting indices of substrings in the string ‘STR’ that are anagram with given ‘PTR’ which are index 0 and 5.
It was a direct problem on String matching Algorithm.
After checking the constraints , it was pretty obvious that i have to use RABIN KARP Algo for the same.



In zigzag order, level 1 is printed from left to right fashion, level 2 is printed from right to left. and level 3 is printed from left to right again, and so on…..
For the given binary tree

The zigzag traversal is [1, 4, 3, 5, 2, 7, 6]
This is one famous questions related to Binary Tree.
I solved it with BFS approach using queue Data Structures.



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?
I started with Brute Force approach as initially there were no codition on using division operator or not.
But i was given some test cases where my solution was giving wrong answer then i applied some chanes and at last i was given the codition that i can't use the division operator.
The. after sometime i proposed a solution where i was using 2 array one prefix and suffix array to store the product of array elements from start to index i and end to index i respectively.
Later on i was asked to optimise the space and i done this using 1 array instead of 2.
1. What is a foreign key?
2. Difference between SQL and NO SQL database.

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?