Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,165 views
in Online Assessments by Expert (34,270 points) | 1,165 views

1 Answer

0 like 0 dislike

Filled up a form in LinkedIn and then got the link for CRED.
3 questions, 90 minutes of Time.
Platform - Hackerrank

  1. Write everything. N cities are there connected using (n-1) bidirectional roads. Each city has a score given by A[i]. Two Marathons were to be organized. But the path of the marathon to conitain cities with only even score or an odd score. You have to tell max number of cities in the marathon path if the cities were with even score or with odd score. **Input ** -
    5 (n cities)
    4 3 2 3 5 (n scores of cities)
    1 2 (n-1 lines denoting a road b/w two cities)
    1 3
    2 4
    2 5

    Output - 2 3

     

  2.  

    Doctor Strange is finding the number of outcomes where Avengers will win the war given that number of days the war will go on.
    The possible number of wins given by d days = number of pure number sequences of length d.
    A pure number sequence is a sequence of digits where any digit (0-9) can come at any index i iff either n is 0(zero) or any divisor of n(except for 1) has been already placed before such that (j<i).
    Guess the number of wins that Strange gets. Return the numbers of wins in modulo 1e9+7
    Input d = 1, answer = 9 (1,2,3,4,5,6,7,8,9)
    d = 2, answer = 23 (1 to 9,20,22,24,26,28, 30,33, 36... and so on)

by Expert (34,270 points)