Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Technical round with questions based on DSA.
To reverse a number following steps should be performed:
Take the number’s modulo by 10
Multiply the reverse number by 10 and add modulo value into the reverse number.
Divide the number by 10.
Repeat above steps until number becomes zero.
rev = 0; // reversed number
rem; // initialise a variable to store remainder
This can be solved both: recursively and iteratively.
The recursive approach is more intuitive. First reverse all the nodes after head. Then we need to set head to be the final node in the reversed list. We simply set its next node in the original list (head -> next) to point to it and sets its next to NULL. The recursive approach has a O(N) time complexity and auxiliary space complexity....
What's the difference in C++ between "new int" and "malloc(5 * sizeof(int))"?
First, new int must be freed using delete, and malloc(...) must be freed using free. You cannot mix and match.
Second, if you use a type with a constructor then malloc will not call the constructor, and free will not call the destructor. You have to call them manually (or just use new/free).