Tip 1: Don't sit silently and code, explain to the interviewer your approach and each step.
Tip 2: Take help from the interviewer don't treat him like a villain(he is there to help you)
Tip 3: Understand the patterns, it will help you choose the data structure easily
Tip 1: Give links for every project, live or Github link (it will make your work authentic)
Tip 2: Make your resume concise and easy to scan (1 page)
DSA coding questions were asked
For the given 5 intervals - [1, 4], [3, 5], [6, 8], [10, 12], [8, 9].
Since intervals [1, 4] and [3, 5] overlap with each other, we will merge them into a single interval as [1, 5].
Similarly, [6, 8] and [8, 9] overlap, merge them into [6,9].
Interval [10, 12] does not overlap with any interval.
Final List after merging overlapping intervals: [1, 5], [6, 9], [10, 12].
This problem can be solved with a linear scan algorithm. The list of input intervals is given, and we’ll keep merged intervals in the output list. For each interval in the input list:
class graphNode
{
public:
int data;
vector<graphNode*> neighbours;
}
1. Nodes are numbered from 1 to N.
2. Your solution will run on multiple test cases. If you are using global variables make sure to clear them.
We use depth first traversal and create a copy of each node while traversing the graph. Use a hashtable to store each completed node so we won’t revisit nodes that exist in that hashtable. The hashtable key will be a node in the original graph, and its value will be the corresponding node in the cloned graph.
The manager just asked me one DSA question, mostly resume and my projects
For the trees given below:-
The given trees are identical as:-
1. The number of nodes in both trees is the same.
2. The number of edges in both trees is the same.
3. The data for root for both the trees is the same i.e 5.
4. The data of root -> left (root’s left child) for both the trees is the same i.e 2.
5. The data of root -> right (root’s right child) for both the trees is the same i.e 3.
6. The data of root -> right -> left ( left child of root’s right child) for both the trees is the same i.e 6.
7. Nodes with data 2 and 6 are the leaf nodes for both the binary trees.
Use a depth-first traversal on both trees simultaneously and keep comparing the data at each level to solve this problem.
Tell me about your projects.
Conflict management in projects
Tip 1: Create a technology summary section in addition to your skills section.
Tip 2 Include collegial education information including CPGA and PORs.
Introduce yourself
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++?