Restolabs

CTC --> 4 LPA
Full stack developer

Q1 Given a number n find first number in fibonacci series having the number of digits equal to n.
Solved using prefix sum

Q2 Print all possible palindromes in a given string.
Tried to solve using brute force

Q3 In a party there are many people and a celibrity. All people know the celibrity and can know other people. but celibrity knows no one in the party
Find minimum number of ways so that we can we find the celibrity. For this we can ask question to people ex.
Ask A: (Do u know B ans yes, do you know C) --> Ask B if he known C ans--> yes ask C if he knows D ans no.
So C is the celibrity.

I tried the logic of SSSP using BFS.

Q4 Given many number of people with their birth and death year like 2000 and 2060. find year in which city has max. population.

verdict --> waiting

Comments (1)