Tip 1 : Be conceptually strong
Tip 2 : Practice good amount of questions
Tip 3 : Do good projects
Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume and be confident.
It consisted of 2 coding questions in 45 min. According to me, the first one was quite easy and the second was medium.


The attendees holding numbers from 1, 4, 3 are shown:

For the above example 1 -> 4 -> 3, 1 -> 3 -> 4 is the only correct answer, i.e nodes should be grouped sequentially. Hence, 3 -> 1 -> 4 is the wrong answer as we have to preserve the same order.
1) Initialize two index variables left and right:
left = 0, right = size -1
2) Keep incrementing left index until we see an even number.
3) Keep decrementing right index until we see an odd number.
4) If left < right then swap arr[left] and arr[right]



For this question, you can assume that 0 raised to the power of 0 is 1.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Initialize three pointers prev as NULL, curr as head and next as NULL.
Iterate through the linked list. In loop, do following.
// Before changing next of current,
// store next node
next = curr->next
// Now change next of current
// This is where actual reversing happens
curr->next = prev
// Move prev and curr one step forward
prev = curr
curr = next



Input: 'list' = [1, 2, 3, 4], 'k' = 2
Output: 2 1 4 3
Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.
All the node values will be distinct.
Reverse the first sub-list of size k. While reversing keep track of the next node and previous node. Let the pointer to the next node be next and pointer to the previous node be prev.
head->next = reverse(next, k) ( Recursively call for rest of the list and link the two sub-lists )
Return prev ( prev becomes the new head of the list
1. What is the difference between C and C++? Which one is better and why?
2. What are Encapsulation and abstraction?
3. What is runtime polymorphism? Explain with code. He wanted me to write the whole code and then explain it. After this, he directly jumped to DSA questions.
This round was only for 25 min. This round was very relaxing. We had a very light discussion.
1. Introduction
2. Why SAP? What do you know about SAP? Any SAP product name?
3. Where is SAP belongs?
4. Where do you see yourself in the next 2 years?
5. He asked about my Location preference.
Tip 1 : Have knowledge about the company you are applying to
Tip 2 : Be confident

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?