Skip to content
Related Articles

Related Articles

Myntra Interview Experience
  • Last Updated : 04 Feb, 2019

Round 1:

  1. Given Parent Array Such that parent[i]=j where j is the parent and Value array . Need to Find Best possible sum .

    Root node will have -1 as parent.

    Best Possible sum is maximum sum in one of the tree paths.

    Integer[] parent = new Integer[] { -1, 0, 0, 2, 3 };
     Integer[] values = new Integer[] { 0, 4, 6, -11, 3 };
    
         (0/0)----(1/4)
         |
         |
         (2/6)
         |
         |
         (3/-11)
         |
         |
         (4/3)
    
    
    Maximum sum here would be 6+0+4=10 for path 2-->0-->1.
  2. Degree of An Array.
    https://leetcode.com/articles/degree-of-an-array/
  3. Monsoon umbrellas. 

     

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :