Tip 1: Practice at least 250 DSA questions from diverse topics.
Tip 2: Participate in coding competitions regularly to improve problem-solving skills.
Tip 3: Work on at least two personal projects to apply your knowledge practically and build a strong portfolio.
Tip 1: Tailor your resume for each application, focusing on the skills and experiences most relevant to the job.
Tip 2: Use clear and concise bullet points to describe your achievements and responsibilities, quantifying your accomplishments whenever possible.
There were 8 coding Questions
2 easy
4 medium
2 hard



Given an array of integer nums and an integer target, return indices of the two numbers such that they add up to the target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
You can return the answer in any order.
Step 1: Understand the Problem
The task is to find two indices in an array such that their corresponding values sum up to a given target. Each input is guaranteed to have exactly one solution, and you cannot use the same element twice.
Step 2: Initial Approach (Brute Force)
Initially, a straightforward approach would be to use a nested loop to check every possible pair of indices in the array. For each pair, check if their values add up to the target.
- Time Complexity:** O(n²), where n is the number of elements in the array.
Step 3: Optimize with Hash Map
To improve efficiency, use a hash map (or dictionary) to keep track of the indices of the elements you have seen so far. As you iterate through the array:
- For each element, calculate the complement (i.e., `target - current_element`).
- Check if this complement exists in the hash map. If it does, you’ve found the solution.
- If not, store the current element's index in the hash map and continue.
Step 4: Implementation
Step 5: Test the Solution
Verify the solution with different test cases to ensure it correctly handles various scenarios:
- Arrays with positive numbers
- Arrays with negative numbers
- Arrays where the solution involves indices in different positions
Step 6: Review and Optimize
Ensure that the solution is both correct and efficient. The optimized approach using the hash map has a time complexity of O(n) and space complexity of O(n), making it suitable for large arrays.
---
This stepwise approach demonstrates the problem-solving process, starting with a basic solution and then optimizing it for better performance.



Given a grid of size n*m (n is the number of rows and m is the number of columns in the grid) consisting of '0's (Water) and '1's(Land). Find the number of islands.
Step 1: Understand the Problem
The problem involves finding the number of distinct islands in a grid where '1' represents land and '0' represents water.
An island is defined as a group of connected '1's, connected horizontally, vertically, or diagonally.
Step 2: Initial Approach
I started by thinking about traversing the grid and identifying groups of connected '1's.
A common approach for such problems is to use Depth-First Search (DFS) or Breadth-First Search (BFS) to explore and mark connected components.
Step 3: Implement DFS to Count Islands
I implemented a DFS approach to explore each cell of the grid.
For each unvisited '1', I initiate a DFS to mark the entire connected component (island) as visited.
I used an auxiliary boolean matrix to keep track of visited cells.
Step 4: Code Implementation
I defined a numIslands function to iterate over each cell of the grid.
If a cell contains '1' and has not been visited, I initiated a DFS from that cell and incremented the island count.
The DFS function (search) explores all 8 possible directions (horizontal, vertical, and diagonal) to find connected land cells.
Step 5: Handling Boundaries and Connections
In the search function, I checked if the current cell is out of bounds or already visited or water ('0'). If so, I returned without further processing.
If the cell is valid, I marked it as visited and recursively explored its neighbours in all 8 directions.
Step 6: Optimizations and Final Review
The DFS approach efficiently finds all connected land cells and counts islands with time complexity O(n * m), where n and m are the grid dimensions.
I reviewed the code to ensure it handled edge cases like grids with no land cells or grids with only one cell.
During the HR round, I was asked the following questions:
Career Expectations: They inquired about my long-term career goals and what I envision for my professional growth.
Why This Role: I was asked to explain why I was interested in the specific role and how it aligns with my career objectives.
Family Background: The interviewer wanted to understand my family background and how it has influenced my career choices.
Where Do You See Yourself in 5 Years: They asked about my career aspirations and where I see myself in the next five years.
Be Authentic and Reflective:
Tip: Answer questions honestly and reflect on your true motivations and experiences. Authenticity helps build a genuine connection with the interviewer and demonstrates self-awareness.
Approach: Share personal stories and experiences that illustrate your values and career aspirations. Authentic responses are more memorable and relatable.
Align Your Answers with the Company’s Values:
Tip: Research the company’s mission, values, and culture before the interview. Tailor your responses to show how your career goals and values align with the company’s objectives and work environment.
Approach: Mention specific aspects of the company’s culture or mission that resonate with you and explain how they align with your professional goals and values.
Prepare Clear and Concise Responses:
Tip: Structure your answers clearly and concisely. Avoid rambling and stay focused on the question asked. This demonstrates good communication skills and respect for the interviewer’s time.
Approach: Use frameworks like STAR (Situation, Task, Action, Result) to organize your responses effectively. Practice summarizing your answers in a way that highlights your key points and achievements.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?