Tip 1 : Try to solve data Structure problems and also attend weekly challenges
Tip 2 : Do some good Projects and explain in brief about them on your Resume
Tip 1 : Try to Provide links of GitHub and other coding platforms where you have practiced
Tip 2 : Projects are very Important, so make some good Projects and mention them with relevant technologies.
They provide me 3 coding questions and I had 60 minutes to solve them.
Let arr=[-1,-1,-2,4,3]
We can take the subset {-1,-2,4,3} which will have the product as 24. We can verify that this is the largest product possible. Hence we return 24.
Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
For the given binary tree
The reverse level order traversal will be {7,6,5,4,3,2,1}.
1- Round is of 1 hour
2- Introduction of both and directly jump to coding Problem
Let S = “abdd” and X = “bd”.
The windows in S which contain all the characters in X are: 'abdd', 'abd', 'bdd', 'bd'.
Out of these, the smallest substring in S which contains all the characters present in X is 'bd'.
All the other substring have a length larger than 'bd'.
I had solved this problem using Sliding Window Technique
1- had inserted string in hashset and find out all distinct characters in string
2- then use hashmap and 2 pointer to traverse whole string and perform insertion and deletion of characters from hashmap
Input: Let the binary tree be:
Output: YES
Explanation: As we can see in the image, the original tree is the same as the mirrored tree.
1- Used dfs approach where I try to compare left and right childs of current root node
2- Also told bfs Approach
Introduction of both, little bit discussion on my Projects and then coding problem
Input:
["AutocompleteSystem","input","input","input"]
[[["i want to join faang","icecream","i love coding ninjas"],[4,3,1],["i"],["s"],["#"]]
Output:
[null,["i want to join faang","icecream","i love coding ninjas"],[],[]]
Explanation:
* AutocompleteSystem obj = new AutocompleteSystem(["i want to join faang","icecream","i love coding ninjas"],[4,3,1]);
* obj.input(“i”); // return ["i want to join faang","icecream","i love coding ninjas"]. There are three sentences that have prefix "I".
* obj.input(“s”); // return []. There is no sentence with prefix “is”
* obj.input(“#”); // return [].
1- This problem is trie based problem
2- Here we insert all words in the trie and increment word end value
3- Search words by typing any number of characters
4- If wordend value is one for that word print it
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you write a single-line comment in C++?