Tip 1 : Practice 3 question atleast daily on any coding platform such as GFG, Leetcode, Coding NInjas
Tip 2 : Be consistent
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.



I used DFS to find number of distinct components.



1. When N is odd consider the middle element to be part of 1st half.
2. The sum should not contain any leading zero, except the number 0 itself.
Given Linked List: 1-2-3-4-5-5-6
First half: 1-2-3-4
Second half: 5-5-6
Output Linked List: 1-7-9-0 = (1234 + 556 = 1790)
Can you add both halves without finding the length of Linked List and in O(1) space?
Simple list traversal concept



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.
Solved using stack



You can use any string of A multiple times.
A =[“coding”, ”ninjas”, “is”, “awesome”] target = “codingninjas”
Ans = true as we use “coding” and “ninjas” to form “codingninjas”
Paraphrasing the solution in my words
Let's take an example. s="catsand" and wordDict = ["cat", "cats", "and", "sand"].
The solution starts by taking the string S( "catsand") initially finding whether whole string is present or not . IN this case it is not present in the dict.
Now breaking the string and then finding
s.substr( i) gives the substring from ith index till the end. so string word goes as
atsand // not present
tsand // not present
sand //present then the remainder is calculated which is cat in this case and recursive function is called and same thing is done with cat which will return cat and also store the result in the unordered map . Now comes the combine part where both the string are combined and the pushed in the result " cat sand".
and // then comes and which is present so now again wordbreak called on remainder which is cats now and this will return cats. Now both strings are combined and inserted into result . result = {. "cat sand", "cats and"}; Now after the loop ending the result is returned and also stored in map.



For ‘N’ = 3,
All possible combinations are:
((()))
(()())
(())()
()(())
()()()
Stack concept helped me to solve this problem
It was mix of HLD, LLD design discussion of your project. Make sure you know enough about your projects.
What do you know about Microsoft leadership principles?
Tip 1 : Revolve your answers around amazon leadership principles.
Tip 2 : Make sure you do have good knowledge of your projects.

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?