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. 
    
    

     


Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up
Recommended Articles
Page :