Tip 1: Solve DSA questions daily.
Tip 2: Prepare 2-3 system design questions each week.
Tip 3: Continuously try to conduct mock interviews with your friends.
Tip 1: Highlight key projects that demonstrate your technical skills and problem-solving abilities.
Tip 2: Keep your resume concise and tailor it to the role you are applying for, focusing on relevant experiences and accomplishments.
This round was scheduled on the Codility platform, where I had to solve two coding questions in 90 minutes.
Approach:
Use dynamic programming to solve this problem.
Define an array dp[] where dp[i] represents the maximum money that can be robbed up to the i-th house.
At each house, the robber has two choices:
Rob the current house, skip the previous one.
Skip the current house and take the maximum robbed up to the previous house.
Formula:
dp[i] = max(dp[i-1], dp[i-2] + houses[i])
Where dp[i-1] represents not robbing the current house, and dp[i-2] + houses[i] represents robbing the current house (and the one-two house before).
V is the number of vertices present in graph G and vertices are numbered from 0 to V-1.
E is the number of edges present in graph G.
The Graph may not be connected i.e there may exist multiple components in a graph.
Solution Approach:
Use DFS to traverse the tree.
For each node, add its value to the cumulative sum.
Traverse to the left child and right child recursively.
This round was scheduled one week after the online coding round, which lasted for one hour, during which the interviewer asked two coding questions.
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.
Approach:
We can find the length of both linked lists.
Traverse the longer list by the difference in length.
Then, traverse both lists in parallel until the common node is found.
We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
Loop through each number in the array.
For each number, loop through the rest of the array and check if their sum equals the target.
If found, return the indices of both numbers.
If no solution exists, return an empty array or appropriate message.
The Low-Level Design (LLD) round took place early in the Morning, around 9:30 AM, creating a calm but focused environment. The interviewer was knowledgeable, and approachable, and encouraged open discussion, which made the process collaborative. The task involved designing a system at a granular level, focusing on class structure, and component interaction, and adhering to principles like SOLID and separation of concerns. Key areas discussed included API design, error handling, and handling edge cases. The interviewer gave insightful feedback and pushed me to think about optimizations and scalability throughout the session.
Key Requirements for Movie Ticket Booking System:
User Registration & Login: Users can create accounts, log in, and manage profiles.
Browse Movies: View and filter movies by genre, language, or rating.
Theater & Showtimes Selection: Select theatre and showtimes with seat availability.
Seat Selection: Choose specific seats with real-time availability.
Ticket Booking & Payment: Book multiple tickets, apply for promotions, and make secure payments.
Booking Confirmation: Receive a confirmation with details and a QR code for verification.
Booking Modification: Allow booking cancellations or modifications before the showtime.
Admin Management: Admins can manage movies, showtimes, and bookings.
Non-Functional:
Scalability, Performance, Security, High Availability, and Concurrency.
This summarizes the main requirements of the system concisely.
Tip 1: Break Down the Requirements.
Tip 2: Design for Scalability and Concurrency.
Tip 3: Use OOP and Modular Design.
Tip 4: Handle Real-Time Updates and Data Consistency.
Tip 5: Use Design Principles and patterns.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?