Tip 1 : Prepare latest questions on Networking, Security and cloud as it has a separate section.
Tip 2 : Focus on basic array problems and techniques like prime factorization.
Tip 3 : Practice giving output of pseudocode.
Tip 1 : Show willingness to work on latest technology like ML and Data Science.
Tip 2 : Show a good track record of academics if applicable.
There were 6 sections in which MCQ was divided.
Section 1- English and Verbal Reasoning (17 Questions)
Section 2 - Quantitative Reasoning (12 Questions)
Section 3 - Numerical Ability (15 Questions)
Section 4 - MS Office and Common applications (16 Questions)
Section 5 - Pseudocode (20 Questions)
Section 6 - Networking, Security and Cloud (10 questions)
First I tried to solve by creating an isPrime boolean function which would check if each index is prime or not. Then I ran a loop for all indices and calculated the sum. This gave TLE. Then I created a boolean array to keep a track of all the prime elements and applied the Sieve of Eratosthenes method to calculate the prime indices and then compute the result.
Tried a basic approach to a two-pass solution. First calculated left sum starting from index 0 to index mid. Then calculated the right sum in a similar fashion from the last index to mid+1. Optimized the code using 2 pointer technique.
They asked me the approach. I did it just as I learned on Coding Ninjas. Create a path from the root to the node. Create a recursive function to find descendant at distance k below from a given node. Use this function for all elements in the path you found out.