Problem of the day
Tip 1 : Practise problems on Leetcode and solve past year company-specific problems
Tip 2 : Be very good at OOPS concepts, study in-depth about Polymorphism, Inheritance, Friend functions, Operator Overloading
Tip 3 : Do at least one project and know every in and out about it
Tip 1 : Don't fake any project or any programming language on the resume.
Tip 2 : If you are including projects in python or experience in the python language then you must be good with OOPs concepts with implementation.
This was a programming test consisting of 3 sections with 1 question each. 25 mins for the 1st section, and 35 for the 2nd and 3rd section. Each section had its own fixed time.
I quickly implemented a brute force solution in 2-3 minutes to pass partially. Then implemented a time-efficient solution with 7^3 time complexity.
Solved in a greedy manner.
There were two interviewers on a video call. For the first 25 minutes, the first interviewer asked his questions, and later the second one. For the second 25 minutes, questions related to OOPS were discussed, and also was asked to implement few things.
1. What concepts do you know about OOPS?
2. Implement Runtime polymorphism and Compile time polymorphism.
3. What are virtual functions?
4. Write a Copy constructor for a derived class?
5. He made some changes in my base class written, he added static in front of the virtual keyboard and asked me that now tell how will it behave now?
6. Difference between endl and \n?
Tip 1 : Be very thorough with OOPS concepts
Tip 2 : Don't just read about OOPS do try them and write code for OOPS concepts
1. A node will be in the bottom...
I thought for a bit time then made some trees on the editor and asked him the expected output for those to get the clarity, Then I implemented the DFS were along with depth I stored the direction from parent whether reached node as Left child of a parent or right child and implement smart DFS. The interviewer was satisfied with the entire discussion.
It consisted of two coding problems which involved proper coding it and explaining each and every aspect and I have to show dry run over a few cases
A binary tree is a tree in whi...
Firstly, I solved this using DFS and BFS approach that takes O(N) time so the interviewer asked me to optimize it. Then I used this property of 2*parent,2*parent+1 to solve it in O(logN), I constructed the path from the node to root using a while loop and stored the path. Then traveled from root along that path to reach the required node or if I exceed it then return false.
I solved using recursion + dynamic programming first then I optimized it using the Binary Search approach.
It was a very friendly and chill round.
Here I was supposed to ask the questions from the hiring manager. She asked if I want to know anything about the company or any general questions. So asked him about the projects and teams at Deshaw and some other questions.
Be natural don't try to make a question out of nowhere.