Samsung R&D (OnCampus) 2023 | Easy but tricky
OFFLINE OA EXPERIENCE
Q- We have an equation k= (an + bnlog(base2)n + cn^3) , k is achieved by enumeration on this equation.
We have to find which value of n satisfy above eqaution.
- if no such value of n then return 0.
- (Constraints are for Binary search) .
- input a ,b ,c ,k .
- logbase2 function is already implemented in IDE.
P.S-> Overall easy but tricky -> we have to find optimal search space according to 'c'.
I-----------------------------------------------------------------------------------------
OFFLINE INTERVIEW EXPERIENCE
1 explain DSU.
2 how to find strongly connected components using DSU.
3 time complexities of every possible thing.
4 how to update parent when we add new components and what is the time complexity in both cases...if we maintain parent array and if we donot maintain parent array.
5 path compression
6 kosaraju algorithm
7 significance of union by size
And every possible thing regarding DSU.
P.S-> for interview i can say it's indepth discussionregarding DSU covering every minute details possible.


