Tip 1 : Participate in every coding contest
Tip 2 : Increase up solving
Tip 1: Mention atleast two project
Tip 2: Do not put false things on resume
Online Round consists of 2 Coding Question and we have to explain your solution ex - Time Complexity and space complexity. I have to complete coding question and explanation in 90 mins only.






Interviewer asked me two DSA Question and interview expectation is to solve this question and also explain them as well in 60 mins.



1. The pair should be from different indices.
2. If no such number is present in the ‘ARR’, then return -1.
Interviewer asked me two DSA Question and interview expectation is to solve this question and also explain them as well in 60 mins.


The postorder successor of ‘M’ is defined as the next element to ‘M’ in the sequence of postorder traversal.
If the postorder traversal of a tree is 3 5 4 7 then the postorder successor of 5 is the next element to 5 i.e 4.
Return ‘-1’ if there is no postorder successor of ‘M’.
1. If the right child of a given node exists, then the right child is the postorder predecessor.
2. If the right child does not exist and the given node is left child of its parent, then its sibling is its Postorder predecessor.
3. If none of the above conditions are satisfied (left child does not exist and given node is not the right child of its parent), then we move up using parent pointers until one of the following happens.
4. We reach the root. In this case, the Postorder predecessor does not exist.
5. The current node (one of the ancestors of the given node) is the right child of its parent, in this case, the postorder predecessor is the sibling of the current node.



1. The value of any node will not be equal to zero.
2. Subtree of a node X is all the nodes that are below X and X itself.
3. For example in the tree given below, nodes 1, 2 and 3 are in subtree of 1.

4. Subtree sum of X is the sum value of all the nodes in subtree of X.
5. Binary tree is a tree wherein each node has at most two children.
6. Any two nodes may have the same value associated with it.
I solved the question and explained my approach and the time complexity of my solution to him. He then showed me multiple code snippets and asked me to calculate time complexities for each of them. He asked to calculate the time complexity of the Sieve of the Eratosthenes algorithm.
Interviewer asked me 1 DSA Question for 45 min and interview expectation is to solve this question and also explain them as well in 45 mins and rest 15 min is for LP.



1. The time starts from zero.
2. Before completing one task another task can not be started.
3. The reward for doing a task can be negative.
All tasks are nodes of the graph and if task u is a prerequisite of task v, we will add a directed edge from node u to node v. Now, this problem is equivalent to finding a topological ordering of nodes/tasks (using topological sorting) in the graph represented by prerequisites. If there is a cycle in the graph, then it is not possible to finish all tasks (because in that case there is no any topological order of tasks). Both BFS and DFS can be used for topological sorting to solve it. Since pair is inconvenient for the implementation of graph algorithms, we first transform it to a graph. If task u is a prerequisite of task v, we will add a directed edge from node u to node v

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?