Tip 1: Focus on understanding the basics of data structures and algorithms, rather than just memorizing solutions.
Tip 2: Work on real-world projects to gain hands-on experience and improve your problem-solving skills.
Tip 3: Practice explaining your approach and solutions clearly, as communication is key in interviews.
Tip 1: Highlight relevant projects and skills that align with the job you're applying for.
Tip 2: Keep your resume concise by focusing on your achievements and technical skills, and avoid unnecessary details.
Round 1 Description:



We have an array ARR = {1, 2, 3, 4, 5, 6} and M = 3 , considering 0
based indexing so the subarray {5, 6} will be reversed and our
output array will be {1, 2, 3, 4, 6, 5}.
Step 1: I began by understanding the problem and realizing that the task was to reverse the array in place without using extra space for another array.
Step 2: My initial approach was to use a temporary array to store the reversed elements. However, the interviewer suggested that reversing the array in place would be more efficient, as it wouldn't require extra space.
Step 3: I then proposed a solution using two pointers: one starting from the beginning of the array and the other from the end. I swapped the elements at these pointers and moved them towards each other until they met in the middle.
Step 4: I explained how this solution would work efficiently in O(N) time with O(1) space complexity since we were only swapping elements within the original array.
Step 5: The interviewer was satisfied with this solution because it was both optimal and simple.



Input: ‘S’ =’badam’
Output: ‘ada’
‘ada’ is the longest palindromic substring, and it can be proved that it is the longest possible palindromic substring.
Step 1: First, I understood that the problem was to find the longest palindromic substring in a given string.
Step 2: I recognized that a palindrome reads the same forward and backward. I realized I could utilize a method that expands around the center of the string, as every palindrome has a center.
Step 3: I decided to use the Expand Around Center approach. For each character (or pair of consecutive characters) in the string, I would expand outward to check for a palindrome.
Step 4: I iterated through each character (for odd-length palindromes) and each pair of consecutive characters (for even-length palindromes). For each center, I expanded outward as long as the characters on both sides matched.
Step 5: During each expansion, I checked whether the length of the current palindrome was greater than the previously found palindromes and updated the result accordingly.
Step 6: I repeated this process for all possible centers in the string to ensure that both even and odd-length palindromes were checked.
Step 7: Finally, I returned the longest palindrome found.
Round 2 Description:
Timing: The interview took place during the day, not late at night.
Environment: The environment was professional yet relaxed, which made it easier to focus. The discussion was more interactive in this round.
Significant Activity: The round began with an introduction, followed by a deep dive into my projects. I was then given a coding problem to remove duplicate elements from an array. After solving the problem, the interviewer discussed various data structures such as Quick Sort, stacks, queues, and their real-life applications. The conversation also shifted to AI topics, including how ChatGPT works.
Interviewer: The hiring manager was friendly and engaging, taking the time to explain each topic in detail. They were patient and gave me ample time to think and respond to the questions. The interview felt more like a discussion than an interrogation, which helped me stay at ease.



Do not allocate extra space for another array. You need to do this by modifying the given input array in place with O(1) extra memory.
'n' = 5, 'arr' = [1 2 2 2 3].
The new array will be [1 2 3].
So our answer is 3.
Tip 1: Use a HashSet for Tracking Unique Elements
The first step is to create a HashSet to store the elements we've already seen. As we iterate through the array, we can check if an element is already in the HashSet. If it’s not, we add it to the HashSet and place it in the array. This ensures that only unique elements are added.
Tip 2: Use Two Pointers
A more space-efficient solution is to use two pointers. One pointer (say, i) iterates through the array, while the second pointer (say, j) keeps track of where to insert the next unique element. Whenever we find a new unique element, we place it at position j and increment j. This ensures that only unique elements are kept in the array.
Tip 3: Time and Space Complexity
The time complexity of this approach is O(N), since we are iterating through the array once. The space complexity is O(N) in the case of the HashSet approach, but using the two-pointer technique, the space complexity is reduced to O(1), making it more efficient.
What is Quick Sort, and what are stacks and queues? Can you also tell me about their real-life applications?
Explain how ChatGPT works.
Tip 1: Read up on NLP (Natural Language Processing) techniques such as tokenization, language modeling, and sequence prediction to understand how the model generates human-like responses.
Tip 2: Explore the use of large-scale pre-training and fine-tuning for specific tasks to improve the model's accuracy and relevance in various scenarios.

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