I was contacted by a consultancy if I am looking for swithc.
First round: Problem Solving and Backend related discussion.
- Introduction, current project, current tech stack, knowledge/familiarity of Java as I didn't have any work experience in Java.
- Three Sum problem. Detailed discussion on how it's optimized version gonna be O(n^2), not O(n^3). He was looking for big O notation and how these complexities are calculated, the fundamentals about various kinda complexities.
- Count number of leaves in a binary tree.
- Table1:
name,loc,datetime
abc,india,20200419
xyz,us,20200512
bbb,india,20190101
ccc,mexico,20200105
zzz,india,20180406
sss,us,20200420
Table2:
name,loc,datetime
abc,india,20180419
xyz,uk,20180111
//Write a SQL query to select de-duplicated records (from the combination of above 2 tables) based on “loc” with highest “datetime”
//
//Final output/result should have only one record per location (with its own highest datetime)
//
//Output will be:
//
name,loc,datetime
abc,india,20200419
xyz,us,20200512
ccc,mexico,20200105
xyz,uk,20180111
I couldn't figure out complete query by myself but he helped, and this was the answer we both came to agree -
Select Table.name, Table.loc, Table.datetime from (Select * from Table1 UNION Table2) Table where DENSE_RANK(loc) = 1 PARTITION BY loc ORDER BY datetime;
Second round: Problem Solving and Front end related discussion.
- Introduction, front end experinece, Familiary with front end frameworks, Javascript, ES6.
- Trapping rain water problem, approach and pseudo code.
- Design patterns which I have used. Explain builder pattern with example.
- Webpack, and how it works.
- Dependency injection.
- Closure.
- DOM Manipulation.
- Virtual DOM Manipulation in React.
- Rendering cache.
- Variable hoisting.
- Treeshaking.
- Web workers, I didn't know, but I mentioned service workers which I explained well.
- Web components.
- Difference between var and let.
- Difference between functional programming and object oriented programming.
- Node JS internal architecture. How does it works asynchrously.
- React hooks.
- Various ways of code Optimization methods.
- Any questions.
Result: Waiting for second round response.