# Amazon Interview | Set 54 (For Internship)

Hi All. Here is my interview experience for internship at Amazon. Position: 2-Month Intern No. of Rounds: 1 Online + 2 PI (2 F2F) Round 1: (90 minutes) 20 MCQs and 2 coding questions There were 20 MCQs based on C output, probability, basic maths, OOPS, algorithm analysis and Operating Systems. Question 1: Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Example: Inputs: 1->2->3->4->5->6->7->8->NULL and k = 3 Output: 3->2->1->6->5->4->8->7->NULL. Inputs: 1->2->3->4->5->6->7->8->NULL and k = 5 Output: 5->4->3->2->1->8->7->6->NULL. Question 2: Given a string containing words separated by arbitrary number of spaces. Write a function that returns a string consisting of the first letter of each word. (Note: there may be any number of spaces at the starting of the given string, at the end of the given string or in between words of the string.) Example: Input: ” this is a test case ” Output: tiatc (Function prototypes and main was given for both the questions. Although many solutions passed the initial test cases, they were rejected later as they did not satisfy boundary cases.) Round 2: (face to face) (1 hour 20 min) Question 1: Given two numbers represented by two linked lists, write a function that returns sum list. The sum list is linked list representation of addition of two input numbers. Example
```Input:
First List: 5->6->3  // represents number 563
Second List: 8->4->2 //  represents number 842
Output
Resultant list: 1->4->0->5  // represents number 1405```
```                                    A