Tip 1 : Practice Atleast 250 Questions
Tip 2 :Take time to study DSA
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
2 coding problems and Some mCQS



If the given array is [4, 2, 9] then you should print "3 5 6 7 8". As all these elements lie in the range but not present in the array.
Create a temp array temp[] of size n + 1 with all initial values as 0.
Traverse the input array arr[], and do following for each arr[i]
if(temp[arr[i]] == 0) temp[arr[i]] = 1
Traverse temp[] and output the array element having value as 0 (This is the missing element).



1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Traverse linked list using two-pointers. Move one pointer by one and the other pointers by two. When the fast pointer reaches the end, the slow pointer will reach the middle of the linked list.
Basic HR types questions and questions related to projects and DS algo



153 = 1^3 + 5^3 + 3^3.
Therefore 153 is an Armstrong number.
The approach implemented below is simple. We traverse through all numbers in given range. For every number, we first count number of digits in it. Let the number of digits in current number be n. Them we find sum of n-th power of all digits. If sum is equal to i, we print the number
Tell me about your projects
what is RTOS




If we are given the above binary tree as input then moving from root node(5) to the farthest leaf node(50), the path formed will be [ 5->10->25->35->40->45->50 ]. The total number of nodes encountered is 7, therefore the maximum depth of the binary tree is 7.
maxDepth()
1. If tree is empty then return -1
2. Else
(a) Get the max depth of left subtree recursively i.e.,
call maxDepth( tree->left-subtree)
(a) Get the max depth of right subtree recursively i.e.,
call maxDepth( tree->right-subtree)
(c) Get the max of max depths of left and right
subtrees and add 1 to it for the current node.
max_depth = max(max dept of left subtree,
max depth of right subtree)
+ 1
(d) Return max_depth
What is thread in OS?

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?