Tip 1: Build a strong resume reflecting your coding skills for the resume shortlisting round. Include some achievements to highlight your resume.
Tip 2: Have good knowledge of data structures and algorithms.
Tip 3: Be proficient in at least one coding language.
Tip 1: Build a strong resume reflecting your coding skills, including some simple projects in any tech bucket.
Tip 2: Mention some achievements to highlight your resume and set yourself apart from other candidates.
The round was held in the evening, and it was a telephonic interview conducted on Google Meet. The interviewer was very friendly and told me to relax and stay focused.
Given an array A[] of size N, find the maximum number of operations required to delete all the elements from the array such that in one operation, if you delete the ith element (A[i]), you must also delete A[i] +1 and A[i] - 1 elements, if present.
I had the most optimized approach right from the start, as the question was straightforward and the interview time was very limited. My approach was to sort the array in ascending order and check the condition on the next element, incrementing the pointer accordingly until we reach N. The interviewer was satisfied with the approach and instructed me to code it directly.
If the size of the array is 1, return 1.
Given the root of a generic tree and a node N, count the number of nodes between the two (inclusive both).
I used tree traversal using recursion. When you reach node N, return 1 from there (base case) and accordingly increase your count in the recursion itself. The interviewer was satisfied with the approach and instructed me to code it directly.
What if node N is not present?
Is node N the address of that node or the node value?
Telephonic round on Google meet.
Duration : In the evening
Given an array A[] of integers of size N, check if every element of the array has a frequency >=2.The problem was displayed in a tricky manner. (A real life problem was mentioned before me)
I provided two approaches for the same problem, one using hashing and the other using sorting, specifying the space and time complexity for each. The interviewer instructed me to code using the sorting approach.
If the value of N is 1, return false.
Given an array A[] of size N, find the number of subgroups you can create from this array such that each subgroup should consist of 5 consecutive elements.
I initially explained the approach using a frequency array and traversing it. The interviewer pointed out that the constraints for A[i] were very high, so creating a frequency array was not feasible. I then used hashmaps to store the count of each element and traversed from the smallest to the largest element, storing the answer concurrently.
What if the array does not contain duplicates? The solution approach changes if the array has only distinct values.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you write a single-line comment in C++?