Tip 1: Solve DSA questions daily.
Tip 2: Prepare 2-3 strong projects.
Tip 3: Regularly conduct mock interviews with friends.
Tip 1: Highlight key projects that showcase your technical skills and problem-solving abilities.
Tip 2: Keep your resume concise, tailoring it to the role you’re applying for by focusing on relevant experiences and achievements.



More than one sub-array can have a maximum sum, in that case, output any.



In the First round of my frontend interview, I was given a problem that involved manipulating an array of objects. Each object represented a transaction and had the following properties: a category (e.g., "Groceries," "Entertainment"), an amount (a number representing the transaction's value), and a date (formatted as a string). The task was to group these transactions by category and calculate the total amount spent per category.
For example, given the following array of transactions:
const transactions = [
{ category: "Groceries", amount: 50, date: "2024-08-01" },
{ category: "Entertainment", amount: 100, date: "2024-08-03" },
{ category: "Groceries", amount: 30, date: "2024-08-04" },
{ category: "Bills", amount: 200, date: "2024-08-02" },
{ category: "Entertainment", amount: 50, date: "2024-08-05" }
];
The expected output was an object that displayed the total spent for each category:
{
"Groceries": 80,
"Entertainment": 150,
"Bills": 200
}
To solve this, I used a JavaScript object to store the cumulative totals for each category. As I iterated through each transaction, I checked if the category existed in the result object. If it did, I added the transaction amount to the existing total; if it didn’t, I initialized the category with the transaction amount. This way, by the end of the loop, I had the total spent per category.
I am able to solve this problem in 10 Minutes.


Project Deep Dive:
During the interview, the interviewer reviewed my resume and asked me to walk through each project I had listed. One project, a full MERN stack application, caught their attention, and they focused on that. We discussed the technologies used, and they specifically asked about React hooks, probing deeper into my understanding of useEffect. I explained how I used useEffect in my project to handle side effects, such as fetching data from an API on component mount, updating data in response to state changes, and cleaning up resources when components unmount.
Scenario-Based Question:
Following the discussion, the interviewer presented a scenario-based question related to my project. They asked me to implement a coupon management feature. I needed to write code to manage coupon creation, validation, and application based on various conditions. As I started coding, they provided some guidance on conditions to consider, such as checking the expiration date, ensuring the coupon applies only to eligible products, and handling one-time use cases. With their input, I was able to design a structured and functional solution.
This portion of the interview allowed me to showcase my coding abilities and demonstrated my practical knowledge of React and backend management, as well as my adaptability in responding to scenario-based questions.
I explained that indexing Techniques. I mentioned that B-trees and hash tables are commonly used for indexing. B-trees are particularly effective for range-based queries, while hash tables are efficient for exact-match queries.
Round with Lead Software Engineer:
The round began with the Lead Software Engineer introducing himself and asking me to introduce myself. He was particularly interested in the React and Redux parts of one of my projects, so I gave an overview of the project and discussed my choice of technologies, explaining why I opted for React on the front end.
He asked a series of detailed questions about my React and Redux setup, such as which file is loaded first when the application gets a response from the server and how I structured the components. He also inquired about my choice of React and the advantages I saw in using it for this project. Afterwards, he asked me to open one of my files and walk him through it, with a focus on the Redux-related code.
As I explained, he zeroed in on the useDispatch and useSelector hooks, asking why I wrote the code the way I did and if I could demonstrate an alternative approach. I struggled to come up with a different method on the spot, and he didn't offer any suggestions to help me think through it. I sensed that he wasn’t entirely satisfied with my responses, and I felt that this impacted the flow of the conversation.
This round was challenging and highlighted the importance of understanding different approaches and being prepared to justify each coding decision in detail.

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?