# Amazon Interview | Set 106 (On Campus for Internship)

Amazon came to our campus recently for placements and internships. I attended for internship and i am sharing my experience here.

First Round: Online:

20 MCQs based on basic aptitude,OS,C programming and data structures.
2 coding questions:

1. Consider a coordinate system consisting of n coordinates from (x1,y1)…..(xn,yn)
Also there are two values ymin and ymax given to you. You have to return min(D) where D is x^2 + y^2 for all y lying between ymin and ymax inclusive. If there is no such y then return -1.
2. Given a number n and a number k. You have to find the next bigger number from n which is obtained after exaclty k swaps.
```Eg: Take n=43592169 and k=5
1st swap: 43952169
2nd swap: 49352169
3rd swap: 94352169
4th swap: 94532169
5th swap: 95432169 :- final number```

.

First Interview:

1. Check if a linked list is palindrome or not.
2. Given an array of n integers(positive or negative). Find the maximum sum of subsequence of the array and also total number such arrays possible having the maximum sum.

Second Interview(Final):

1. A linked list consists of two pointers: a next pointer and a child pointer. We have to make the linked list linear i.e. making all the child pointers NULL.
```eg:  1->2->3->4
|     |
5->6  8
|
7