Tip 1 : Prepare Java or C++ thoroughly as no other language will be there in online test.
Tip 2 : Linked lists and trees are very important in Josh's interviews. Practice at least 100 questions.
Tip 3 : Prepare your resume well. Do at least 4 projects.
Tip 1 : Mention your top good projects and do not add more than 5 projects
Tip 2 : Do not put false things on your resume.
3 Coding questions and some MCQ questions related to Core Computer Science were asked in this round. It was conducted at 10 AM.



The idea is to use the simple method of multiplying two numbers. We multiply two numbers starting from their least significant digit and moving towards the most significant digit. So we need to access the nodes of linked lists from last to first. First step would be to reverse both the linked lists. Then multiply both the linked lists starting from their heads and then reverse the resulting multiplied list and return its head.



If the given 'ARR' is [1, 4, 1, 4, 3, 2, 3, 0]. Then {1, 4, 1, 4}, {3, 2, 3}, {3, 0}, {0} are some of the switching subarrays. But {1, 4, 3}, {1, 4, 1, 4, 3, 2, 3} are not.



For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3
1
/ \
2 3
/ \
4 5
The answer should be [1,2,4] because level 1 has an average of 1(AVERAGE of 1), level 2 has an average of 2 (floor value) (AVERAGE of 2 and 3) and level 2 has an average of 4 (floor value) (AVERAGE of 4 and 5).



1
/ \
2 3
The root to leaf path 1->2 represents the number 12.
The root to leaf path 1->3 represents the number 13.
The total sum of all the possible root to leaf paths is 12+13 = 25
The output may be very large, return the answer after taking modulus with (10^9+7).



• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.



The idea is to fix the tree in a Post-order fashion. When we visit a node, we make sure that its left and right sub-trees are already fixed. In case 1.a), we simply remove the root and return the right sub-tree as a new root. In case 1.b), we remove the root and return the left sub-tree as a new root.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?