Jio | OA | HackerEarth Test
Anonymous User
2552

1]
There are n unique candies (labeled 1 through n) and k kids. You are asked to distribute all the candies to kids such that every kids has at most M candies. return number of ways we can distribute candies.
There can be multiple ways to distribute the candies.
e.g N=3 K=2 M=2
answer = 2
(1 way) -> (1,2) and (2 way)-> (2,1)
Similar to:- https://leetcode.com/problems/count-ways-to-distribute-candies/

2] There is arrays with cities and profit on each city. Person can travel from city i to city j if i<j and profit of j is multiple of profit at i. return maximum profit person can achieve.
e.g. cities= [1,2,3,4,5] profit=[3,4,6,8,10]
ans = 12

3]
Reaching Points
https://leetcode.com/problems/reaching-points/

Comments (0)