Zeta Interview Experience


This post is to share my interview experience with Zeta (Directi) for a Senior Software Engineer position in Bangalore (May 2019). I was initially contacted by InterviewBit who co-ordinated the interview process.

Round 1 - Phone Interview

The first round was a telephonic interview with a developer, focused on problem-solving, data-structures and algorithms. The interviewer was polite and eager to help, and that made the conversation easier.

Given two numbers(integers), find their average without using additional datatypes or data-structures

A simple question, but the catch is to handle overflows for large numbers. (Normally, you compute the average by summing up the numbers and dividing by 2. What if the sum is too large to be held in an integer variable)

Print the left view of binary tree

This is pretty much a standard question these days. I just talked to the interviewer about the approach(level order traversal, and print the first node at each level) and was asked to code this on a Google doc. He reviewed the code , pointed out an issue which I addressed quickly, and we moved on to the next question.

Given a list of intervals, find the minimum range required to represent the overlap across the intervals.

For example, if the intervals are [[1,2],[2,3]], the expected result it [2,2]. If the intervals are [[1,100],[120,160],[200,300]], the expected result it [100,200]

It took me some time to grasp the question, and understand the expected result for different cases. The interviewer was again trying to give lots of hints, and we arrived at a solution after much help from his side. I did not have time to code it though. The solution involves sorting the intervals on the start value of the intervals, iterating through the list and expanding the resultant interval to the start of the next interval if they are not overlapping. If they are overlapping, just move on to the next interval without expanding the resultant interval. It’s really difficult to explain this in writing, and would be much easier to visualize by drawing the intervals on paper (which is what the interviewer suggested as well).

Round 2 - Problem solving and Coding

The first F2F round was again focused on problem-solving and coding.

A player can score 1 or 2 or 3 runs in each ball. Given the number of balls(n), find the number of possible scores after n balls. (Hey, it was IPL season back then! 😁)

I came up with the recurrence relation (albeit, with a couple of mistakes the interviewer helped me recognize), and we discussed about the time complexity. I initially struggled, but the interviewer was patient and kind enough to educate me with simple way to calculate time complexity for recursive solutions. We then talked about optimizing this with a DP solution, and the time and space complexity for this solution

Given the number of chars(n) in a language, find the number of possible strings that can be formed where none of the strings have a palindromic substring

Again, I came up with the recurrence relation, and we discussed about the time and space complexity for the recurrence relation. The interviewer talked about some non-trivial math logic for integer exponentiation (exponentiation by squaring) which would reduce the complexity for the problem. We then moved on to the next question.

Given an array and an integer k, find the minimum number of elements you need to remove(or the maximum number of elements you need to retain) from the array so that the sum of the elements in the array < k

We talked about multiple approaches, and the time and space complexities of each. The final solution involved sorting the array, and maintaining a sliding window (containing elements with sum < k). I then coded this solution , and the interviewer validated it thoroughly for all corner cases.

Round 3 - Programming and tech fundamentals

This round was with a more senior engineer in the team, and covered a wide range of topics from java fundamentals, OO and system design principles, REST API design, etc.

What is Spring and why do you need it?

What is the use of *Autowired* annotation?

What is IOC container?

What is the use of volatile keyword?

What are other constructs that aid in synchronization?

What are immutable classes and what is their main advantage? (Ans: They are thread-safe)

How is a Concurrent HashMap implemented?

Is it safe to use a regular HashMap in case of multiple readers but single writer (answer: no)

How are indexes implemented in db

What is CAP theorem?

What is eventual consistency?

Kafka delivery guarantee (exactly once from kafka 11, atleast-once before that)

Kafka ordering guarantee

What is REST? (No state on server)

Questions on http methods (which methods are idempotent, which are not)

Round 4 - System Design

This round was with an Engineering Manager, and focused on system design. I was asked to design Youtube - The interviewer kept the question vague enough and I was expected to ask further questions regarding the requirements , scope them and discuss the solution. We discussed about the various entities involved (Video, User, Tag , Subscriber, etc), their attributes and relationships. After this I wasn’t pretty sure which direction to take - I ended up talking about the different datastores(SQL/NoSQL) that can be use used to persist this data, how it can be scaled, etc. To my surprise, the interviewer was not very keen on discussing this and was a bit more interested to see what will be the different modules for this application, what will be their responsibilities/boundaries.

I was then asked to code a part of the module as a take-home assignment, and share it for review. I did that within the same night and got the feedback in a couple of days asking me to come on-site for a final round with the CTO.

Round 5 - With the CTO

This was the final round, and was with the CTO of Zeta. He had a really calm demeanour, was soft-spoken and very down-to -earth, which helped me settle in. He asked me what my favourite question during the interview process were. I talked about the questions I was asked in the 1st F2F round, but wasn’t articulating it well enough (What a great time to be nervous and stupid!). I then mentioned a question I was asked in the 2nd F2F round (Is it safe to use a regular HashMap in case of multiple readers but single writer?). He asked what are some of the possible things that can go wrong in this case. I could only point out one possible issue, but wasn’t able to add on to that.

He then asked me about the volatile keyword in java. After I answered it, he started probing further where exactly it’s useful, answering which would need a bit of understanding about the Java memory model and how the volatile keyword is relevant in multi-processor and multi-core processor systems. (Do read up on volatile and java memory model if you find this interesting)

After this, he gave an overview about Zeta, the problem space the company is trying to address and the challenges that are in store.

Final Thoughts

This was easily one of the best interview experiences I’ve ever had, if not the best. All the interviewers were smart , punctual and incredibly helpful. They gave the feeling that they wanted to help me, and wanted me to succeed in solving the questions. The interview process was well thought-through, and was tailored to give a great candidate -experience (No scheduling blunders or frustrating wait-times). I had a 10-15 minutes break after every round (which the recruiter claimed was intentional, so as to not exhaust the candidates), which helped me refresh and regain the focus for the next round. The recruiter was kind enough to keep me company during the break 😄

Eventually, I got an offer after a few days, but ended up not accepting it (due to some other opportunities I had). However, I feel I would’ve been an opportunity to work with some incredibly smart people, had I accepted the offer and still feel bad sometimes for passing up the opportunity.

See Also