I was contacted by a recruiter from Salesforce through Naukri.com in early September. After applying, the recruiter called me at 8:00 PM and provided an online assessment link. I was instructed to complete it by 12 Noon the next day. I finished the assessment immediately.
The online assessment consisted of two medium-difficulty questions. I recall some test cases failing. I manually tried to find the solution and realized my code was producing the correct answer, but the test cases were still not passing. I concluded that it was possibly a bug.
I was then invited for in-person interviews.
Round 1 The first round focused on Data Structures and Algorithms. The question was: Given a list of logs, implement a class with two APIs:
I recognized that the brute force approach would involve traversing all the logs and selecting the relevant ones. The optimized approach would involve sorting the logs based on the timestamp and using binary search to find the start and end of the applicable logs.
I took my time, presented the brute force approach, discussed the complexities, and then presented the optimized approach. I clarified many details, including the log string structure, which was something like: severity-timestamp-message.
Initially, I stored the logs in an ordered map by extracting the timestamp and using it as the key. However, the interviewer did not want me to use extra space for storing keys. I mentioned that the severity (error, warning, trace, etc.) could be of variable length. If it were fixed length, I could directly index the timestamp and avoid extra traversal. The interviewer then changed the log structure to "timestamp-severity-message." The timestamp was in the format YYYY:MM:DD:HH:mm::ss. I observed that a normal string comparison would compare the dateTime as expected.
I coded in C++ and wrote clean code with custom lambdas in the sort, upper_bound, and lower_bound functions. The code ran, and the interviewer's manual test cases passed.
The interviewer began wrapping up the interview, and I felt a little skeptical as one question seemed too few in an ideal interview. So, I asked if I could attempt another question in the next 5 minutes. He replied that he had enough information to evaluate me and it wasn't necessary. I asked the interviewer about his work and we concluded the interview.
Round 2 The second round was a manager round. The interviewer delved into the projects I had worked on. I explained things in detail, and he would ask me to elaborate whenever I mentioned any technical term or design pattern. He asked me a puzzle. He also inquired about the front-end tech stacks I had worked with. I had only worked on desktop applications as part of my work but had explored Android and web front-end technologies personally. I had built some projects using them. I had recently created my portfolio on the web and hosted it on GitHub. I immediately showed him the responsive site on my phone, which I believe impressed him. The interview ended on a positive note with him asking about my work location preferences. I chose over . He then asked if I would consider if he offered me the position there. I said yes, I would. Fortunately, I ended up getting the location.
I received the offer in early October.