Tip 1 : Doing competitive programming is very beneficial.
Tip 2 : Be very clear with OOPs and DBMS fundamentals.
Tip 3 : Graphs and DP.
Tip 1 : Know end to end about the projects mentioned in the resume.
Tip 2 : Try to include your skills and projects resonating with the keywords mentioned in the job description.
There were a total of 3 problems with partial scoring if you pass some test cases.
Problems scoring distribution: 100 + 300 + 300 = 700
1. ‘N’ contains only digits ‘0’ to ‘9’ and English letters ‘A’ to ‘F’.
2. Decimal equivalent of 0 is 0, 1 is 1, . . .9 is 9, A is 10, B is 11, . . . F is 15.
((a+b)) has a pair of redundant brackets. The pair of brackets on the first and last index is needless.
While (a + (b*c)) does not have any pair of redundant brackets.
At the end of all M Participants completing the exam, the final correct answers get decided.
Based on these answers score of each candidate gets recalculated, and the one with the highest score is the TOPPER!!!
If more than one Participant gets the top score, then the one who attempted the exam first is treated as TOPPER.
There was only one graph problem with few follow-ups.
If the given adjacency matrix is:
[0 1 0]
[1 0 1]
[0 1 0] and M = 3.
The given adjacency matrix tells us that node 1 is connected to node 2 and node 2 is connected to node 3.
So if we color vertex 1 with ‘red’, vertex 2 with ‘blue’, and vertex 3 with ‘red’, it is possible to color the given graph with two colors which is less than or equal to M.
Combining solutions for both starting problem as well as follow-up.
Step 1: Little observation: The sum of 2 numbers is odd only if exactly one of them is odd.
Step 2: Only parity of color matters.
Step 3: The problem looks somewhat similar to getting a bipartite graph ( 2-Coloring).
Step 4: If a cycle is present in the graph number of ways is zero. (Try to convince yourself: by taking a small example of a cycle of 3 nodes.)
Step 5: Use a bfs or dfs to find the number of nodes on each level.
Step 6: All nodes on the same level must be colored with the same color.
The number of ways to color a connected component can be break down to 2 cases: (For extending this, just find the number of colors with odd parity and even parity).
1.) Color all nodes on an odd level with color 1, so even-level nodes have to be colored with color 2.
2.) Color all nodes on an odd level with color 2, so even-level nodes have to be colored with color 1.
The total possible number of ways is the Product of a total number of ways across each component.
1 low-level design kind of problem with a lot of discussions around the problem.
If the bus route is [3, 6, 7], then it will travel in sequence
3 > 6 > 7 > 3 > 6 > 7….
Values of A[i] are distinct.
The first step was to clear the requirements as initially, the problem was vague.
After asking some questions, the problem was given a few bus routes, we have to answer queries efficiently.
Query: What are the following buses we can take if we go from city city1 to city2?
Approach: We can use some data structures to answer the queries efficiently.
// a map from {city1, city2} to all the buses which drive that between those cities.
unordered_map , unordered_set> citiesToBus;
We can populate this data structure using the initial bus routes given.
Then we can answer the query directly.
Follow up: The first bus we can take to travel from city1 to city2 if we are in city1 at the time T.
We have to make a slight modification to our data structure:
// a map from {city1, city2} to all the buses with time which drive that between those cities.
unordered_map , set>> citiesToBus;
To answer the query now:
We can take the lower bound in the set of buses available from city1 to city2.
Timings: Morning 11:30 AM.
Initially discussed my last internship experience.
HR questions:
1.) Strengths.
2.) Weaknesses.
Tip 1 : Be clear about why you used a particular tech stack.
Tip 2 : What you did end to end.
DBMS standard problems: 1.) ACID properties. 2.) SQL vs NO-SQL. 3.) Concurrency and transactions
Tip 1 : Be very clear with the DBMS fundamentals.
Tip 2 : ACID properties, Schedules, and writing SQL queries are most important from DBMS.
OOPS questions: 1.) Types of polymorphism with use cases. 2.) Use case for Abstraction.
Tip 1 : Must know all 4 pillars of OOPs.
Tip 2 : Should be able to code in an object-oriented way.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is 3 + 2 * 4 based on operator precedence?