Summary
I interviewed for a Full stack developer position at Restolabs, covering four core technical problems including Fibonacci series, palindrome generation, finding a celebrity in a party, and determining the year with maximum population. I am currently awaiting the final verdict.
Full Experience
My Interview Experience at Restolabs
I recently had an interview for a Full stack developer role at Restolabs. The interview focused heavily on data structures and algorithms, with four distinct problems presented.
For the first question, I was asked to find the first number in the Fibonacci series that has n digits, which I approached using a prefix sum technique. The second problem involved printing all possible palindromes from a given string, where I attempted a brute force solution.
The third question was a classic "Find the Celebrity" problem, requiring me to identify a unique person in a party who is known by everyone else but knows no one. I tried to apply a SSSP (Single Source Shortest Path) logic using BFS for this.
Finally, I was presented with a problem about population analysis: given people's birth and death years, find the year with the maximum population in the city. The verdict for my interview is currently pending.
Interview Questions (4)
Given a number n, find the first number in the Fibonacci series that has n digits.
Print all possible palindromes in a given string.
In a party, there are many people and a celebrity. All people know the celebrity, and can know other people, but the celebrity knows no one in the party. Find the minimum number of ways to find the celebrity. For this, we can ask questions to people, for example: 'Do you know B?'. For instance, if A knows B, B knows C, and C does not know D, then C is the celebrity.
Given many people with their birth and death years (e.g., birth 2000 and death 2060), find the year in which the city has the maximum population.