First Round: Codility test having 2 problems to solve in 80 mins like-
a) Replace '? in the given string, such that no 2 adjacent alphabets are same.
Alphabets will be in small case only.
b) You are given array of numbers such each index represents a person & number shows
that how many people that person can have in the same room including him/herself.
Now you need to find the number of rooms required to accomodate all the people.
e.g. {1,1,1,1,1} Ans:5
{2,1,4} Ans:2
Second Round: Had basic discussion then got 3 coding problems like-
a) determine if source string can be made equal to target string by either
adding/deleting/replacing one character.
b) determine the number of add/delete/replace opeartions needed to make source string
equal to target string.
c) An array pid contains the id of processes & and array ppid contains the parent id of the id at
that index. Now you are given 1 process id to terminate. Now return the list of ids will be
terminated including the given id.
e.g. Input: pid = [1,3,10,5], ppid = [3,0,5,3], kill = 5
Output: [5,10]
Solution: Create a Map<Integer, List<Integer>> such that key will be process id & value will
contain list of its child ids. Now iterate through this map to get the list of deleted ids.
a) Replace '? in the given string, such that no 2 adjacent alphabets are same.
Alphabets will be in small case only.
b) You are given array of numbers such each index represents a person & number shows
that how many people that person can have in the same room including him/herself.
Now you need to find the number of rooms required to accomodate all the people.
e.g. {1,1,1,1,1} Ans:5
{2,1,4} Ans:2
Second Round: Had basic discussion then got 3 coding problems like-
a) determine if source string can be made equal to target string by either
adding/deleting/replacing one character.
b) determine the number of add/delete/replace opeartions needed to make source string
equal to target string.
c) An array pid contains the id of processes & and array ppid contains the parent id of the id at
that index. Now you are given 1 process id to terminate. Now return the list of ids will be
terminated including the given id.
e.g. Input: pid = [1,3,10,5], ppid = [3,0,5,3], kill = 5
Output: [5,10]
Solution: Create a Map<Integer, List<Integer>> such that key will be process id & value will
contain list of its child ids. Now iterate through this map to get the list of deleted ids.