Date of Visit : 21.08.2018
Criteria: CGPA 6 & above, No current arrear
Platform: Hackerrank
The test consisted of two coding problems
1.Smart Sale
Given a backpack containing n items in an array the sales person can remove any number of items of the same type from the backpack. Finally display number of 'm' distinct type of items in the bag.
sol: https://www.geeksforgeeks.org/minimum-number-of-distinct-elements-after-removing-m-items/
2. Diamond Mine
Given a matrix of n*n. Each cell contain 0, 1, -1.
0 denotes there is no diamond but there is a path.
1 denotes there is diamond at that location with a path
-1 denotes that the path is blocked.
Now you have start from 0,0 and reach to last cell & then return back to 0,0 collecting maximum no of diamonds.
While going to last cell you can move only right and down.
While returning back you can move only left and up.
Input:
<n - size of matrix>
<row 1, n integers, space separated >
<row 2>
.
.
.
<row n>
Output :
Max diamonds that can be collected
Sample Input:
0 1
-1 1
Sample Output
2
sol: http://www.edufyme.com/code/?id=c20ad4d76fe97759aa27a0c99bff6710
Criteria: CGPA 6 & above, No current arrear
Platform: Hackerrank
The test consisted of two coding problems
1.Smart Sale
Given a backpack containing n items in an array the sales person can remove any number of items of the same type from the backpack. Finally display number of 'm' distinct type of items in the bag.
sol: https://www.geeksforgeeks.org/minimum-number-of-distinct-elements-after-removing-m-items/
2. Diamond Mine
Given a matrix of n*n. Each cell contain 0, 1, -1.
0 denotes there is no diamond but there is a path.
1 denotes there is diamond at that location with a path
-1 denotes that the path is blocked.
Now you have start from 0,0 and reach to last cell & then return back to 0,0 collecting maximum no of diamonds.
While going to last cell you can move only right and down.
While returning back you can move only left and up.
Input:
<n - size of matrix>
<row 1, n integers, space separated >
<row 2>
.
.
.
<row n>
Output :
Max diamonds that can be collected
Sample Input:
0 1
-1 1
Sample Output
2
sol: http://www.edufyme.com/code/?id=c20ad4d76fe97759aa27a0c99bff6710
Smart
ReplyDeletehttps://smartsale0.blogspot.com/?m=1
Prepare4Test Apple 9L0-422 PDF is designed with the latest 9L0-422 exam material. All questions are planned and verified by Apple certified experts.
ReplyDelete